public class Berk extends Object
| Constructor and Description |
|---|
Berk() |
Berk(String host) |
Berk(org.openqa.selenium.WebDriver driver) |
Berk(org.openqa.selenium.WebDriver driver,
String host,
String port) |
| Modifier and Type | Method and Description |
|---|---|
void |
click(org.openqa.selenium.WebDriver driver,
String elementName,
int waitTime)
This method clicks on the specified element.
|
List<Integer> |
getCenterCoordinates(org.openqa.selenium.WebDriver driver,
String elementPath) |
List<Integer> |
getCenterCoordinates(org.openqa.selenium.WebDriver driver,
String elementPath,
int waitTimeSecond)
Given a WebDriver, an element path, and a wait time, this method returns the center coordinates of the element.
|
String |
getHost()
This method returns the host.
|
String |
getPort()
This method returns the port number.
|
void |
getText(org.openqa.selenium.WebDriver driver,
String elementName,
int waitTime)
This method gets the text of the specified element.
|
Map<Boolean,BerkResponse> |
ifElementDisplayedGetCoordinates(org.openqa.selenium.WebDriver driver,
String elementPath,
int waitTimeSecond)
Checks if the specified element is displayed and returns a BerkResponse wrapped in an Optional.
|
Map<Boolean,BerkResponse> |
ifElementDisplayedGetText(org.openqa.selenium.WebDriver driver,
String elementPath,
int waitTimeSecond)
This method checks if the specified element is displayed and returns a BerkResponse wrapped in a Map.
|
Boolean |
isElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath,
int waitTimeSecond) |
void |
scrollUntilElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath) |
void |
sendKeys(io.appium.java_client.AppiumDriver driver,
String elementPath,
String text,
int waitTime)
This method sends keys to the specified element.
|
void |
setHost(String host)
This method sets the host.
|
void |
setPort(String port)
This method sets the port number.
|
void |
takeScreenshot(org.openqa.selenium.WebDriver driver)
Takes a screenshot of the current state of the WebDriver.
|
boolean |
waitUntilElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath)
Waits until the specified element is displayed.
|
boolean |
waitUntilElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath,
int waitTime) |
public Berk()
public Berk(String host)
public Berk(org.openqa.selenium.WebDriver driver)
public String getPort()
public void setPort(String port)
port - the port number to setpublic String getHost()
public void setHost(String host)
host - the host to setpublic List<Integer> getCenterCoordinates(org.openqa.selenium.WebDriver driver, String elementPath, int waitTimeSecond) throws IOException
driver - the WebDriver instanceelementPath - the path to the elementwaitTimeSecond - the maximum time to wait for the element to be displayedIOException - if an I/O error occurspublic List<Integer> getCenterCoordinates(org.openqa.selenium.WebDriver driver, String elementPath) throws IOException
IOExceptionpublic boolean waitUntilElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath)
throws IOException
driver - the WebDriver instanceelementPath - the path to the elementIOExceptionpublic boolean waitUntilElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath,
int waitTime)
throws IOException
IOExceptionpublic Boolean isElementDisplayed(org.openqa.selenium.WebDriver driver, String elementPath, int waitTimeSecond) throws IOException
IOExceptionpublic Map<Boolean,BerkResponse> ifElementDisplayedGetCoordinates(org.openqa.selenium.WebDriver driver, String elementPath, int waitTimeSecond) throws IOException
driver - the WebDriver instanceelementPath - the path to the elementwaitTimeSecond - the maximum time to wait for the element to be displayedIOException - if an I/O error occurspublic void click(org.openqa.selenium.WebDriver driver,
String elementName,
int waitTime)
throws IOException
driver - the WebDriver instanceelementName - the path to the elementwaitTime - the maximum time to wait for the element to be displayedIOException - if an I/O error occurspublic void takeScreenshot(org.openqa.selenium.WebDriver driver)
throws IOException
driver - the WebDriver instanceIOException - if an I/O error occurspublic void scrollUntilElementDisplayed(org.openqa.selenium.WebDriver driver,
String elementPath)
throws IOException
IOExceptionpublic void sendKeys(io.appium.java_client.AppiumDriver driver,
String elementPath,
String text,
int waitTime)
throws IOException
driver - the AppiumDriver instanceelementPath - the path to the elementtext - the text to sendwaitTime - the maximum time to wait for the element to be displayedIOException - if an I/O error occurspublic void getText(org.openqa.selenium.WebDriver driver,
String elementName,
int waitTime)
throws IOException
driver - the WebDriver instanceelementName - the path to the elementwaitTime - the maximum time to wait for the element to be displayedIOException - if an I/O error occurspublic Map<Boolean,BerkResponse> ifElementDisplayedGetText(org.openqa.selenium.WebDriver driver, String elementPath, int waitTimeSecond) throws IOException
driver - the WebDriver instanceelementPath - the path to the elementwaitTimeSecond - the maximum time to wait for the element to be displayedIOException - if an I/O error occursCopyright © 2024. All rights reserved.