| Modifier | Constructor and Description |
|---|---|
protected |
Element(org.openqa.selenium.By loc,
String name,
ElementState state) |
| Modifier and Type | Method and Description |
|---|---|
void |
click()
Clicks on the item.
|
protected void |
doWithRetry(Runnable action) |
protected <T> T |
doWithRetry(Supplier<T> action) |
<T extends IElement> |
findChildElement(org.openqa.selenium.By childLoc,
String name,
Class<T> clazz,
ElementState state)
Find an element in the parent element
|
<T extends IElement> |
findChildElement(org.openqa.selenium.By childLoc,
String name,
IElementSupplier<T> supplier,
ElementState state)
Finds an element in the parent element
|
<T extends IElement> |
findChildElements(org.openqa.selenium.By childLoc,
String name,
Class<T> clazz,
ElementState state,
ElementsCount count)
Finds child elements by their locator relative to parent element.
|
<T extends IElement> |
findChildElements(org.openqa.selenium.By childLoc,
String name,
IElementSupplier<T> supplier,
ElementState state,
ElementsCount count)
Finds child elements by their locator relative to parent element.
|
protected abstract IApplication |
getApplication() |
String |
getAttribute(String attr)
Gets attribute value of the element.
|
protected IElementCacheHandler |
getCache() |
protected abstract IConditionalWait |
getConditionalWait() |
org.openqa.selenium.remote.RemoteWebElement |
getElement(Duration timeout)
Gets current element by specified
IElement.getLocator()
NoSuchElementException throws if element not found |
protected abstract IElementActionRetrier |
getElementActionRetrier() |
protected abstract IElementCacheConfiguration |
getElementCacheConfiguration() |
protected abstract IElementFactory |
getElementFactory() |
protected abstract IElementFinder |
getElementFinder() |
protected ElementState |
getElementState() |
protected abstract String |
getElementType() |
protected abstract ILocalizationManager |
getLocalizationManager() |
protected abstract ILocalizedLogger |
getLocalizedLogger() |
org.openqa.selenium.By |
getLocator()
Gets unique locator of element.
|
protected Logger |
getLogger() |
protected ILoggerConfiguration |
getLoggerConfiguration() |
String |
getName()
Gets unique name of element
|
String |
getText()
Gets the item text (inner text).
|
protected void |
logElementAction(String messageKey,
Object... args) |
protected ILogElementState |
logElementState() |
protected void |
logPageSource(org.openqa.selenium.WebDriverException exception) |
void |
sendKeys(String keys)
Sends keys
|
IElementStateProvider |
state()
Provides ability to define of element's state (whether it is displayed, exists or not) and respective waiting functions
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetElementfindChildElement, findChildElement, findChildElement, findChildElement, findChildElement, findChildElement, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElements, findChildElementsprotected Element(org.openqa.selenium.By loc,
String name,
ElementState state)
protected abstract IApplication getApplication()
protected abstract IElementFactory getElementFactory()
protected abstract IElementFinder getElementFinder()
protected abstract IElementCacheConfiguration getElementCacheConfiguration()
protected abstract IElementActionRetrier getElementActionRetrier()
protected abstract ILocalizedLogger getLocalizedLogger()
protected abstract ILocalizationManager getLocalizationManager()
protected abstract IConditionalWait getConditionalWait()
protected abstract String getElementType()
protected IElementCacheHandler getCache()
protected ILoggerConfiguration getLoggerConfiguration()
protected Logger getLogger()
protected ILogElementState logElementState()
public org.openqa.selenium.By getLocator()
IElementgetLocator in interface IElementpublic String getName()
IElementpublic IElementStateProvider state()
IElementpublic org.openqa.selenium.remote.RemoteWebElement getElement(Duration timeout)
IElementIElement.getLocator()
NoSuchElementException throws if element not foundgetElement in interface IElementtimeout - Timeout for waitingRemoteWebElement if found.protected void logPageSource(org.openqa.selenium.WebDriverException exception)
public String getText()
IElementpublic String getAttribute(String attr)
IElementgetAttribute in interface IElementattr - Attribute namepublic void click()
IElementpublic <T extends IElement> T findChildElement(org.openqa.selenium.By childLoc, String name, Class<T> clazz, ElementState state)
IParentfindChildElement in interface IParentT - the type of the element to be obtainedchildLoc - child element locatorname - output name in logsclazz - class or interface of the element to be obtainedstate - visibility state of target elementpublic <T extends IElement> T findChildElement(org.openqa.selenium.By childLoc, String name, IElementSupplier<T> supplier, ElementState state)
IParentfindChildElement in interface IParentT - the type of the element to be obtainedchildLoc - Child element locatorname - output name in logssupplier - required element's supplierstate - visibility state of target elementpublic <T extends IElement> List<T> findChildElements(org.openqa.selenium.By childLoc, String name, Class<T> clazz, ElementState state, ElementsCount count)
IParentfindChildElements in interface IParentT - Type of the target elements.childLoc - Locator of child elements relative to its parent.name - Child elements name.clazz - Class or interface of the elements to be obtained.state - Visibility state of target elements.count - Expected number of elements that have to be found (zero, more then zero, any).public <T extends IElement> List<T> findChildElements(org.openqa.selenium.By childLoc, String name, IElementSupplier<T> supplier, ElementState state, ElementsCount count)
IParentfindChildElements in interface IParentT - Type of the target elements.childLoc - Locator of child elements relative to its parent.name - Child elements name.supplier - Required elements' supplier.state - Visibility state of child elements.protected <T> T doWithRetry(Supplier<T> action)
protected void doWithRetry(Runnable action)
protected ElementState getElementState()
Copyright © 2020. All rights reserved.