Uses of Interface
org.openqa.selenium.WebElement
Package
Description
-
Uses of WebElement in org.openqa.selenium
Modifier and TypeMethodDescriptionWebDriver.TargetLocator.activeElement()
Switches to the element that currently has focus within the document currently "switched to", or the body element if this cannot be detected.By.findElement
(SearchContext context) Find a single element.SearchContext.findElement
(By by) Find the firstWebElement
using the given method.WebDriver.findElement
(By by) Find the firstWebElement
using the given method.WebElement.findElement
(By by) Find the firstWebElement
using the given method.WrapsElement.getWrappedElement()
Modifier and TypeMethodDescriptionabstract List<WebElement>
By.findElements
(SearchContext context) Find many elements.SearchContext.findElements
(By by) Find all elements within the current context using the given mechanism.WebDriver.findElements
(By by) Find all elements within the current page using the given mechanism.WebElement.findElements
(By by) Find all elements within the current context using the given mechanism.Modifier and TypeMethodDescriptionWebDriver.TargetLocator.frame
(WebElement frameElement) Select a frame using its previously locatedWebElement
. -
Uses of WebElement in org.openqa.selenium.devtools.events
ModifierConstructorDescriptionDomMutationEvent
(WebElement element, String attributeName, String currentValue, String oldValue) -
Uses of WebElement in org.openqa.selenium.interactions
Modifier and TypeMethodDescriptionActions.click
(WebElement target) Clicks in the middle of the given element.Actions.clickAndHold
(WebElement target) Clicks (without releasing) in the middle of the given element.Actions.contextClick
(WebElement target) Performs a context-click at middle of the given element.Actions.doubleClick
(WebElement target) Performs a double-click at middle of the given element.Actions.dragAndDrop
(WebElement source, WebElement target) A convenience method that performs click-and-hold at the location of the source element, moves to the location of the target element, then releases the mouse.Actions.dragAndDropBy
(WebElement source, int xOffset, int yOffset) A convenience method that performs click-and-hold at the location of the source element, moves by a given offset, then releases the mouse.static PointerInput.Origin
PointerInput.Origin.fromElement
(WebElement element) static WheelInput.ScrollOrigin
WheelInput.ScrollOrigin.fromElement
(WebElement element) static WheelInput.ScrollOrigin
WheelInput.ScrollOrigin.fromElement
(WebElement element, int xOffset, int yOffset) Actions.keyDown
(WebElement target, CharSequence key) Performs a modifier key press after focusing on an element.Actions.keyUp
(WebElement target, CharSequence key) Performs a modifier key release after focusing on an element.Actions.moveToElement
(WebElement target) Moves the mouse to the middle of the element.Actions.moveToElement
(WebElement target, int xOffset, int yOffset) Moves the mouse to an offset from the element's in-view center point.Actions.release
(WebElement target) Releases the depressed left mouse button, in the middle of the given element.Actions.scrollToElement
(WebElement element) If the element is outside the viewport, scrolls the bottom of the element to the bottom of the viewport.Actions.sendKeys
(WebElement target, CharSequence... keys) Equivalent to calling: Actions.click(element).sendKeys(keysToSend). This method is different fromsendKeys(CharSequence...)
- seeActions.sendKeys(CharSequence...)
for details how. -
Uses of WebElement in org.openqa.selenium.remote
Modifier and TypeMethodDescriptionRemoteWebDriver.RemoteTargetLocator.activeElement()
RemoteWebDriver.findElement
(By locator) RemoteWebElement.findElement
(By locator) DomMutation.getElement()
Modifier and TypeMethodDescriptionRemoteWebDriver.findElements
(By locator) RemoteWebDriver.findElements
(SearchContext context, BiFunction<String, Object, CommandPayload> findCommand, By locator) RemoteWebElement.findElements
(By locator) Modifier and TypeMethodDescriptionRemoteWebDriver.RemoteTargetLocator.frame
(WebElement frameElement) protected void
RemoteWebDriver.setFoundBy
(SearchContext context, WebElement element, String by, String using) ModifierConstructorDescriptionDomMutation
(WebElement element, String attributeName, String currentValue, String oldValue) -
Uses of WebElement in org.openqa.selenium.support
-
Uses of WebElement in org.openqa.selenium.support.decorators
-
Uses of WebElement in org.openqa.selenium.support.events
Modifier and TypeMethodDescriptiondefault void
WebDriverListener.afterAnyWebElementCall
(WebElement element, Method method, Object[] args, Object result) This method will be called after any method of aWebElement
instance is called.default void
WebDriverListener.afterClear
(WebElement element) This action will be performed each time afterclear()
is called.default void
WebDriverListener.afterClick
(WebElement element) This action will be performed each time afterclick()
is called.default void
WebDriverListener.afterFindElement
(WebDriver driver, By locator, WebElement result) This method will be called afterWebDriver.findElement(By)
is called.default void
WebDriverListener.afterFindElement
(WebElement element, By locator, WebElement result) This action will be performed each time afterfindElement(By)
is called.default void
WebDriverListener.afterFindElements
(WebElement element, By locator, List<WebElement> result) This action will be performed each time afterfindElements(By)
is called.default void
WebDriverListener.afterFrame
(WebDriver.TargetLocator targetLocator, WebElement frameElement, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.frame(WebElement)
()} is called.default void
WebDriverListener.afterGetAttribute
(WebElement element, String name, String result) This action will be performed each time aftergetAttribute(String)
is called.default void
WebDriverListener.afterGetCssValue
(WebElement element, String propertyName, String result) This action will be performed each time aftergetCssValue(String)
is called.default void
WebDriverListener.afterGetLocation
(WebElement element, Point result) This action will be performed each time aftergetLocation()
is called.default void
WebDriverListener.afterGetSize
(WebElement element, Dimension result) This action will be performed each time aftergetSize()
is called.default void
WebDriverListener.afterGetTagName
(WebElement element, String result) This action will be performed each time aftergetTagName()
is called.default void
WebDriverListener.afterGetText
(WebElement element, String result) This action will be performed each time aftergetText()
is called.default void
WebDriverListener.afterIsDisplayed
(WebElement element, boolean result) This action will be performed each time afterisDisplayed()
is called.default void
WebDriverListener.afterIsEnabled
(WebElement element, boolean result) This action will be performed each time afterisEnabled()
is called.default void
WebDriverListener.afterIsSelected
(WebElement element, boolean result) This action will be performed each time afterisSelected()
is called.default void
WebDriverListener.afterSendKeys
(WebElement element, CharSequence... keysToSend) default void
WebDriverListener.afterSubmit
(WebElement element) This action will be performed each time aftersubmit()
is called.default void
WebDriverListener.beforeAnyWebElementCall
(WebElement element, Method method, Object[] args) This method will be called before any method of aWebElement
instance is called.default void
WebDriverListener.beforeClear
(WebElement element) This action will be performed each time beforeclear()
is called.default void
WebDriverListener.beforeClick
(WebElement element) This action will be performed each time beforeclick()
is called.default void
WebDriverListener.beforeFindElement
(WebElement element, By locator) This action will be performed each time beforefindElement(By)
is called.default void
WebDriverListener.beforeFindElements
(WebElement element, By locator) This action will be performed each time beforefindElements(By)
is called.default void
WebDriverListener.beforeFrame
(WebDriver.TargetLocator targetLocator, WebElement frameElement) This action will be performed each time beforeWebDriver.TargetLocator.frame(WebElement)
()} is called.default void
WebDriverListener.beforeGetAttribute
(WebElement element, String name) This action will be performed each time beforegetAttribute(String)
is called.default void
WebDriverListener.beforeGetCssValue
(WebElement element, String propertyName) This action will be performed each time beforegetCssValue(String)
is called.default void
WebDriverListener.beforeGetLocation
(WebElement element) This action will be performed each time beforegetLocation()
is called.default void
WebDriverListener.beforeGetSize
(WebElement element) This action will be performed each time beforegetSize()
is called.default void
WebDriverListener.beforeGetTagName
(WebElement element) This action will be performed each time beforegetTagName()
is called.default void
WebDriverListener.beforeGetText
(WebElement element) This action will be performed each time beforegetText()
is called.default void
WebDriverListener.beforeIsDisplayed
(WebElement element) This action will be performed each time beforeisDisplayed()
is called.default void
WebDriverListener.beforeIsEnabled
(WebElement element) This action will be performed each time beforeisEnabled()
is called.default void
WebDriverListener.beforeIsSelected
(WebElement element) This action will be performed each time beforeisSelected()
is called.default void
WebDriverListener.beforeSendKeys
(WebElement element, CharSequence... keysToSend) This action will be performed each time beforesendKeys(CharSequence...)
is called.default void
WebDriverListener.beforeSubmit
(WebElement element) This action will be performed each time beforesubmit()
is called.Modifier and TypeMethodDescriptiondefault void
WebDriverListener.afterFindElements
(WebDriver driver, By locator, List<WebElement> result) This method will be called afterWebDriver.findElements(By)
is called.default void
WebDriverListener.afterFindElements
(WebElement element, By locator, List<WebElement> result) This action will be performed each time afterfindElements(By)
is called. -
Uses of WebElement in org.openqa.selenium.support.locators
Modifier and TypeMethodDescriptionRelativeLocator.RelativeBy.above
(WebElement element) RelativeLocator.RelativeBy.below
(WebElement element) RelativeLocator.RelativeBy.near
(WebElement element) RelativeLocator.RelativeBy.near
(WebElement element, int atMostDistanceInPixels) RelativeLocator.RelativeBy.toLeftOf
(WebElement element) RelativeLocator.RelativeBy.toRightOf
(WebElement element) -
Uses of WebElement in org.openqa.selenium.support.pagefactory
Modifier and TypeMethodDescriptionAjaxElementLocator.findElement()
Find the element.ByAll.findElement
(SearchContext context) ByChained.findElement
(SearchContext context) DefaultElementLocator.findElement()
Find the element.ElementLocator.findElement()
protected WebElement
DefaultFieldDecorator.proxyForLocator
(ClassLoader loader, ElementLocator locator) Modifier and TypeMethodDescriptionAjaxElementLocator.findElements()
Find the element list.ByAll.findElements
(SearchContext context) ByChained.findElements
(SearchContext context) DefaultElementLocator.findElements()
Find the element list.ElementLocator.findElements()
protected List<WebElement>
DefaultFieldDecorator.proxyForListLocator
(ClassLoader loader, ElementLocator locator) Modifier and TypeMethodDescriptionprotected boolean
AjaxElementLocator.isElementUsable
(WebElement element) By default, elements are considered "found" if they are in the DOM. -
Uses of WebElement in org.openqa.selenium.support.ui
Modifier and TypeMethodDescriptionISelect.getFirstSelectedOption()
Select.getFirstSelectedOption()
Select.getWrappedElement()
Modifier and TypeMethodDescriptionstatic ExpectedCondition<WebElement>
ExpectedConditions.elementToBeClickable
(By locator) An expectation for checking an element is visible and enabled such that you can click it.static ExpectedCondition<WebElement>
ExpectedConditions.elementToBeClickable
(WebElement element) An expectation for checking an element is visible and enabled such that you can click it.ISelect.getAllSelectedOptions()
Select.getAllSelectedOptions()
ISelect.getOptions()
Select.getOptions()
static ExpectedCondition<List<WebElement>>
ExpectedConditions.numberOfElementsToBe
(By locator, Integer number) An expectation for checking number of WebElements with given locatorstatic ExpectedCondition<List<WebElement>>
ExpectedConditions.numberOfElementsToBeLessThan
(By locator, Integer number) An expectation for checking number of WebElements with given locator being less than defined numberstatic ExpectedCondition<List<WebElement>>
ExpectedConditions.numberOfElementsToBeMoreThan
(By locator, Integer number) An expectation for checking number of WebElements with given locator being more than defined numberstatic ExpectedCondition<List<WebElement>>
ExpectedConditions.presenceOfAllElementsLocatedBy
(By locator) An expectation for checking that there is at least one element present on a web page.static ExpectedCondition<WebElement>
ExpectedConditions.presenceOfElementLocated
(By locator) An expectation for checking that an element is present on the DOM of a page.static ExpectedCondition<WebElement>
ExpectedConditions.presenceOfNestedElementLocatedBy
(By locator, By childLocator) An expectation for checking child WebElement as a part of parent element to presentstatic ExpectedCondition<WebElement>
ExpectedConditions.presenceOfNestedElementLocatedBy
(WebElement element, By childLocator) An expectation for checking child WebElement as a part of parent element to be presentstatic ExpectedCondition<List<WebElement>>
ExpectedConditions.presenceOfNestedElementsLocatedBy
(By parent, By childLocator) An expectation for checking child WebElement as a part of parent element to presentstatic ExpectedCondition<WebElement>
ExpectedConditions.visibilityOf
(WebElement element) An expectation for checking that an element, known to be present on the DOM of a page, is visible.static ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfAllElements
(List<WebElement> elements) An expectation for checking that all elements present on the web page that match the locator are visible.static ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfAllElements
(WebElement... elements) An expectation for checking that all elements present on the web page that match the locator are visible.static ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfAllElementsLocatedBy
(By locator) An expectation for checking that all elements present on the web page that match the locator are visible.static ExpectedCondition<WebElement>
ExpectedConditions.visibilityOfElementLocated
(By locator) An expectation for checking that an element is present on the DOM of a page and visible.static ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfNestedElementsLocatedBy
(By parent, By childLocator) An expectation for checking child WebElement as a part of parent element to be visiblestatic ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfNestedElementsLocatedBy
(WebElement element, By childLocator) An expectation for checking child WebElement as a part of parent element to be visibleModifier and TypeMethodDescriptionstatic ExpectedCondition<Boolean>
ExpectedConditions.attributeContains
(WebElement element, String attribute, String value) An expectation for checking WebElement with given locator has attribute which contains specific valuestatic ExpectedCondition<Boolean>
ExpectedConditions.attributeToBe
(WebElement element, String attribute, String value) An expectation for checking given WebElement has attribute with a specific valuestatic ExpectedCondition<Boolean>
ExpectedConditions.attributeToBeNotEmpty
(WebElement element, String attribute) An expectation for checking WebElement any non empty value for given attributestatic ExpectedCondition<Boolean>
ExpectedConditions.domAttributeToBe
(WebElement element, String attribute, String value) An expectation for checking given WebElement has DOM attribute with a specific valuestatic ExpectedCondition<Boolean>
ExpectedConditions.domPropertyToBe
(WebElement element, String property, String value) An expectation for checking given WebElement has DOM property with a specific valuestatic ExpectedCondition<Boolean>
ExpectedConditions.elementSelectionStateToBe
(WebElement element, boolean selected) An expectation for checking if the given element is selected.static ExpectedCondition<WebElement>
ExpectedConditions.elementToBeClickable
(WebElement element) An expectation for checking an element is visible and enabled such that you can click it.static ExpectedCondition<Boolean>
ExpectedConditions.elementToBeSelected
(WebElement element) An expectation for checking if the given element is selected.static ExpectedCondition<WebDriver>
ExpectedConditions.frameToBeAvailableAndSwitchToIt
(WebElement frameLocator) An expectation for checking whether the given frame is available to switch to.static ExpectedCondition<Boolean>
ExpectedConditions.invisibilityOf
(WebElement element) An expectation for checking the element to be invisiblestatic ExpectedCondition<Boolean>
ExpectedConditions.invisibilityOfAllElements
(WebElement... elements) An expectation for checking all elements from given list to be invisiblestatic ExpectedCondition<WebElement>
ExpectedConditions.presenceOfNestedElementLocatedBy
(WebElement element, By childLocator) An expectation for checking child WebElement as a part of parent element to be presentstatic ExpectedCondition<Boolean>
ExpectedConditions.stalenessOf
(WebElement element) Wait until an element is no longer attached to the DOM.static ExpectedCondition<Boolean>
ExpectedConditions.textToBePresentInElement
(WebElement element, String text) An expectation for checking if the given text is present in the specified element.static ExpectedCondition<Boolean>
ExpectedConditions.textToBePresentInElementValue
(WebElement element, String text) An expectation for checking if the given text is present in the specified elements value attribute.static ExpectedCondition<WebElement>
ExpectedConditions.visibilityOf
(WebElement element) An expectation for checking that an element, known to be present on the DOM of a page, is visible.static ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfAllElements
(WebElement... elements) An expectation for checking that all elements present on the web page that match the locator are visible.static ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfNestedElementsLocatedBy
(WebElement element, By childLocator) An expectation for checking child WebElement as a part of parent element to be visibleModifier and TypeMethodDescriptionstatic ExpectedCondition<Boolean>
ExpectedConditions.invisibilityOfAllElements
(List<WebElement> elements) An expectation for checking all elements from given list to be invisiblestatic ExpectedCondition<List<WebElement>>
ExpectedConditions.visibilityOfAllElements
(List<WebElement> elements) An expectation for checking that all elements present on the web page that match the locator are visible.