| Modifier and Type | Method and Description |
|---|---|
static org.openqa.selenium.WebElement |
locate(Locator loc)
Locates the element using the current driver as search context.
|
static org.openqa.selenium.WebElement |
locate(org.openqa.selenium.SearchContext context,
Locator loc)
Locates the element using the search context and locator, waiting for the timeout specified in the locator.
|
static Optional<org.openqa.selenium.WebElement> |
waitForElement(org.openqa.selenium.By by,
int waitSec)
Waits for the presence of an element until a timeout is reached.
|
static Optional<org.openqa.selenium.WebElement> |
waitForElement(org.openqa.selenium.SearchContext context,
org.openqa.selenium.By by,
int waitSec)
Waits for the presence of a specific web element until a timeout is reached.
|
public static org.openqa.selenium.WebElement locate(Locator loc)
loc - the locator to specify the element to locatepublic static org.openqa.selenium.WebElement locate(org.openqa.selenium.SearchContext context,
Locator loc)
context - the search context to locate the element inloc - the locator to specify the elementpublic static Optional<org.openqa.selenium.WebElement> waitForElement(org.openqa.selenium.SearchContext context, org.openqa.selenium.By by, int waitSec)
context - the search context in which the element should be locatedby - the locate for the elementwaitSec - the timeout in secondspublic static Optional<org.openqa.selenium.WebElement> waitForElement(org.openqa.selenium.By by, int waitSec)
by - the locator for the elementwaitSec - the timeout. If the timeout is reached, a NoSuchElementException is thrownCopyright © 2016 DevCon5 GmbH. All rights reserved.