public class LocatorWrappingUniqueElementLocator extends java.lang.Object implements UniqueElementLocator
UniqueElementLocator which wraps an existing
locator.| Constructor and Description |
|---|
LocatorWrappingUniqueElementLocator(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.support.pagefactory.ElementLocator elementLocator,
int index,
java.lang.String pageName,
java.lang.String fieldDescription)
Creates a new element locator.
|
LocatorWrappingUniqueElementLocator(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.support.pagefactory.ElementLocator elementLocator,
java.lang.String pageName,
java.lang.String fieldDescription)
Creates a new element locator where the method
ElementLocator.findElement() is used. |
| Modifier and Type | Method and Description |
|---|---|
org.openqa.selenium.WebElement |
findElement()
Finds a element.
|
java.lang.String |
getFieldDescription()
Get the description of the field, including the context.
|
java.lang.String |
getPageName()
Get the name of the page where the element is.
|
org.openqa.selenium.WebDriver |
getWebDriver()
Returns the underlying
WebDriver. |
public LocatorWrappingUniqueElementLocator(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.support.pagefactory.ElementLocator elementLocator,
int index,
java.lang.String pageName,
java.lang.String fieldDescription)
webDriver - the underlying webdriverelementLocator - a elementLocatorindex - Index which elements of
ElementLocator.findElements() should be used, if -1
the method ElementLocator.findElement() is used.pageName - name of the page where the element is.fieldDescription - description of the field, including the context. *public LocatorWrappingUniqueElementLocator(org.openqa.selenium.WebDriver webDriver,
org.openqa.selenium.support.pagefactory.ElementLocator elementLocator,
java.lang.String pageName,
java.lang.String fieldDescription)
ElementLocator.findElement() is used.webDriver - the underlying webdriverelementLocator - a elementLocatorpageName - name of the page where the element is.fieldDescription - description of the field, including the context.public org.openqa.selenium.WebElement findElement()
findElement in interface UniqueElementLocatorpublic org.openqa.selenium.WebDriver getWebDriver()
UniqueElementLocatorWebDriver.getWebDriver in interface UniqueElementLocatorWebDriver.public java.lang.String getPageName()
getPageName in interface UniqueElementLocatorpublic java.lang.String getFieldDescription()
getFieldDescription in interface UniqueElementLocatorCopyright © 2017 PPI AG. All rights reserved.