Package co.verisoft.fw.pages
Class BasePage
- java.lang.Object
-
- co.verisoft.fw.pages.BasePage
-
- Direct Known Subclasses:
MobileBasePage,WebBasePage
public abstract class BasePage extends Object
Represent base page for WebDriver interface (Web, mobile, client - server) This class contains the basic common functionality shared by all pages- Author:
- David Yehezkel 30 Mar 2020
-
-
Field Summary
Fields Modifier and Type Field Description protected org.openqa.selenium.WebDriverdriverprotected intpollingIntervalprotected inttimeOut
-
Constructor Summary
Constructors Constructor Description BasePage(org.openqa.selenium.WebDriver driver)C-tor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanisOnPage()Checks if driver is on pagebooleanisOnPage(org.openqa.selenium.WebElement... elements)This is a default implementation of isOnPage.booleanurlContains(String fraction)check if the main page url contains the text
-
-
-
Method Detail
-
isOnPage
public boolean isOnPage(org.openqa.selenium.WebElement... elements)
This is a default implementation of isOnPage. It receives one or more WebElements and checks if they are present- Parameters:
elements- One or more WebElements to check for presense- Returns:
- true- all elements specified were present, false - otherwise
-
urlContains
public boolean urlContains(String fraction)
check if the main page url contains the text- Parameters:
fraction- part of url to be search for- Returns:
- true if text contains false other wise
-
isOnPage
public abstract boolean isOnPage()
Checks if driver is on page- Returns:
- true- all elements specified were present, false - otherwise
-
-