Uses of Interface
org.openqa.selenium.WebElement
-
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.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.