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.WebDriver
driver
protected int
pollingInterval
protected int
timeOut
-
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 boolean
isOnPage()
Checks if driver is on pageboolean
isOnPage(org.openqa.selenium.By locator)
This is a another implementation of isOnPage.boolean
isOnPage(org.openqa.selenium.WebElement... elements)
This is a default implementation of isOnPage.boolean
urlContains(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 presence- Returns:
- true- all elements specified were present, false - otherwise
-
isOnPage
public boolean isOnPage(org.openqa.selenium.By locator)
This is a another implementation of isOnPage. It receives a locator and checks if all the WebElements located by this locator are present- Parameters:
locator
- By parameter to check for presence- 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 otherwise
-
isOnPage
public abstract boolean isOnPage()
Checks if driver is on page- Returns:
- true- all elements specified were present, false - otherwise
-
-