@Internal public class WebDriverLocators extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isStale(org.openqa.selenium.WebElement webElement)
Whether the given
WebElement is stale and needs to be relocated. |
static WebDriverLocatable |
list(org.openqa.selenium.WebElement element,
org.openqa.selenium.By locator,
int locatorIndex,
WebDriverLocatable parent)
Creates a WebDriverLocatable for an element included in a list initialized with given element.
|
static WebDriverLocatable |
nested(org.openqa.selenium.By locator,
WebDriverLocatable parent)
Creates a WebDriverLocatable for a single element nested within another locatable.
|
static WebDriverLocatable |
root()
Creates the root of a WebDriverLocatable list, usually the instance of WebDriver.
|
static WebDriverLocatable |
single(org.openqa.selenium.By locator)
Creates a WebDriverLocatable for a single element in global context.
|
static WebDriverLocatable |
staticElement(org.openqa.selenium.WebElement element) |
@Nonnull public static WebDriverLocatable root()
@Nonnull public static WebDriverLocatable single(org.openqa.selenium.By locator)
locator - The locator strategy within the parent. It will be applied in the global search context@Nonnull public static WebDriverLocatable nested(org.openqa.selenium.By locator, WebDriverLocatable parent)
locator - The locator strategy within the parentparent - The parent locatable@Nonnull public static WebDriverLocatable list(org.openqa.selenium.WebElement element, org.openqa.selenium.By locator, int locatorIndex, WebDriverLocatable parent)
element - WebElementlocator - The locator strategy within the parent that will produce a list of matcheslocatorIndex - The index within the list of matches to find this elementparent - The locatable for the parent@Nonnull public static WebDriverLocatable staticElement(org.openqa.selenium.WebElement element)
public static boolean isStale(org.openqa.selenium.WebElement webElement)
WebElement is stale and needs to be relocated.webElement - web element to examinetrue if element reference is stale, false otherwiseCopyright © 2015 Atlassian. All rights reserved.