Uses of Interface
org.openqa.selenium.WebElement
-
-
Uses of WebElement in org.openqa.selenium
Methods in org.openqa.selenium that return WebElement Modifier and Type Method Description WebElement
WebDriver.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.WebElement
By. findElement(SearchContext context)
Find a single element.WebElement
SearchContext. findElement(By by)
Find the firstWebElement
using the given method.WebElement
WebDriver. findElement(By by)
Find the firstWebElement
using the given method.WebElement
WebElement. findElement(By by)
Find the firstWebElement
using the given method.WebElement
WrapsElement. getWrappedElement()
Methods in org.openqa.selenium that return types with arguments of type WebElement Modifier and Type Method Description abstract java.util.List<WebElement>
By. findElements(SearchContext context)
Find many elements.java.util.List<WebElement>
SearchContext. findElements(By by)
Find all elements within the current context using the given mechanism.java.util.List<WebElement>
WebDriver. findElements(By by)
Find all elements within the current page using the given mechanism.java.util.List<WebElement>
WebElement. findElements(By by)
Find all elements within the current context using the given mechanism.Methods in org.openqa.selenium with parameters of type WebElement Modifier and Type Method Description WebDriver
WebDriver.TargetLocator. frame(WebElement frameElement)
Select a frame using its previously locatedWebElement
. -
Uses of WebElement in org.openqa.selenium.devtools.events
Methods in org.openqa.selenium.devtools.events that return WebElement Modifier and Type Method Description WebElement
DomMutationEvent. getElement()
Constructors in org.openqa.selenium.devtools.events with parameters of type WebElement Constructor Description DomMutationEvent(WebElement element, java.lang.String attributeName, java.lang.String currentValue, java.lang.String oldValue)
-
Uses of WebElement in org.openqa.selenium.interactions
Methods in org.openqa.selenium.interactions with parameters of type WebElement Modifier and Type Method Description Actions
Actions. click(WebElement target)
Clicks in the middle of the given element.Actions
Actions. clickAndHold(WebElement target)
Clicks (without releasing) in the middle of the given element.Actions
Actions. contextClick(WebElement target)
Performs a context-click at middle of the given element.Actions
Actions. doubleClick(WebElement target)
Performs a double-click at middle of the given element.Actions
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
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
Actions. keyDown(WebElement target, java.lang.CharSequence key)
Performs a modifier key press after focusing on an element.Actions
Actions. keyUp(WebElement target, java.lang.CharSequence key)
Performs a modifier key release after focusing on an element.Actions
Actions. moveToElement(WebElement target)
Moves the mouse to the middle of the element.Actions
Actions. moveToElement(WebElement target, int xOffset, int yOffset)
Moves the mouse to an offset from the element's in-view center point.Actions
Actions. release(WebElement target)
Releases the depressed left mouse button, in the middle of the given element.Actions
Actions. scrollToElement(WebElement element)
If the element is outside the viewport, scrolls the bottom of the element to the bottom of the viewport.Actions
Actions. sendKeys(WebElement target, java.lang.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
Classes in org.openqa.selenium.remote that implement WebElement Modifier and Type Class Description class
RemoteWebElement
Methods in org.openqa.selenium.remote that return WebElement Modifier and Type Method Description WebElement
RemoteWebDriver.RemoteTargetLocator. activeElement()
protected WebElement
RemoteWebDriver. findElement(java.lang.String by, java.lang.String using)
Deprecated.Rely on usingBy.Remotable
insteadWebElement
RemoteWebDriver. findElement(By locator)
protected WebElement
RemoteWebElement. findElement(java.lang.String using, java.lang.String value)
Deprecated.Rely on usingBy.Remotable
insteadWebElement
RemoteWebElement. findElement(By locator)
Methods in org.openqa.selenium.remote that return types with arguments of type WebElement Modifier and Type Method Description protected java.util.List<WebElement>
RemoteWebDriver. findElements(java.lang.String by, java.lang.String using)
Deprecated.Rely on usingBy.Remotable
insteadjava.util.List<WebElement>
RemoteWebDriver. findElements(By locator)
java.util.List<WebElement>
RemoteWebDriver. findElements(SearchContext context, java.util.function.BiFunction<java.lang.String,java.lang.Object,CommandPayload> findCommand, By locator)
protected java.util.List<WebElement>
RemoteWebElement. findElements(java.lang.String using, java.lang.String value)
Deprecated.Rely on usingBy.Remotable
insteadjava.util.List<WebElement>
RemoteWebElement. findElements(By locator)
Methods in org.openqa.selenium.remote with parameters of type WebElement Modifier and Type Method Description WebDriver
RemoteWebDriver.RemoteTargetLocator. frame(WebElement frameElement)
protected void
RemoteWebDriver. setFoundBy(SearchContext context, WebElement element, java.lang.String by, java.lang.String using)
-
Uses of WebElement in org.openqa.selenium.support
Methods in org.openqa.selenium.support that return WebElement Modifier and Type Method Description WebElement
ByIdOrName. findElement(SearchContext context)
Methods in org.openqa.selenium.support that return types with arguments of type WebElement Modifier and Type Method Description java.util.List<WebElement>
ByIdOrName. findElements(SearchContext context)
-
Uses of WebElement in org.openqa.selenium.support.decorators
Methods in org.openqa.selenium.support.decorators that return types with arguments of type WebElement Modifier and Type Method Description Decorated<WebElement>
WebDriverDecorator. createDecorated(WebElement original)
Methods in org.openqa.selenium.support.decorators with parameters of type WebElement Modifier and Type Method Description Decorated<WebElement>
WebDriverDecorator. createDecorated(WebElement original)
-
Uses of WebElement in org.openqa.selenium.support.events
Methods in org.openqa.selenium.support.events that return WebElement Modifier and Type Method Description WebElement
EventFiringWebDriver. findElement(By by)
Deprecated.Methods in org.openqa.selenium.support.events that return types with arguments of type WebElement Modifier and Type Method Description java.util.List<WebElement>
EventFiringWebDriver. findElements(By by)
Deprecated.Methods in org.openqa.selenium.support.events with parameters of type WebElement Modifier and Type Method Description default void
WebDriverListener. afterAnyWebElementCall(WebElement element, java.lang.reflect.Method method, java.lang.Object[] args, java.lang.Object result)
void
AbstractWebDriverEventListener. afterChangeValueOf(WebElement element, WebDriver driver, java.lang.CharSequence[] keysToSend)
Deprecated.void
WebDriverEventListener. afterChangeValueOf(WebElement element, WebDriver driver, java.lang.CharSequence[] keysToSend)
Deprecated.Called afterWebElement.clear()
,WebElement.sendKeys(...)
}.default void
WebDriverListener. afterClear(WebElement element)
default void
WebDriverListener. afterClick(WebElement element)
void
AbstractWebDriverEventListener. afterClickOn(WebElement element, WebDriver driver)
Deprecated.void
WebDriverEventListener. afterClickOn(WebElement element, WebDriver driver)
Deprecated.Called afterWebElement.click()
.void
AbstractWebDriverEventListener. afterFindBy(By by, WebElement element, WebDriver driver)
Deprecated.void
WebDriverEventListener. afterFindBy(By by, WebElement element, WebDriver driver)
Deprecated.Called afterWebDriver.findElement(...)
, orWebDriver.findElements(...)
, orWebElement.findElement(...)
, orWebElement.findElements(...)
.default void
WebDriverListener. afterFindElement(WebDriver driver, By locator, WebElement result)
default void
WebDriverListener. afterFindElement(WebElement element, By locator, WebElement result)
default void
WebDriverListener. afterFindElements(WebElement element, By locator, java.util.List<WebElement> result)
default void
WebDriverListener. afterGetAttribute(WebElement element, java.lang.String name, java.lang.String result)
default void
WebDriverListener. afterGetCssValue(WebElement element, java.lang.String propertyName, java.lang.String result)
default void
WebDriverListener. afterGetLocation(WebElement element, Point result)
default void
WebDriverListener. afterGetSize(WebElement element, Dimension result)
default void
WebDriverListener. afterGetTagName(WebElement element, java.lang.String result)
void
AbstractWebDriverEventListener. afterGetText(WebElement element, WebDriver driver, java.lang.String text)
Deprecated.void
WebDriverEventListener. afterGetText(WebElement element, WebDriver driver, java.lang.String text)
Deprecated.Called right aftergetText()
method is being calleddefault void
WebDriverListener. afterGetText(WebElement element, java.lang.String result)
default void
WebDriverListener. afterIsDisplayed(WebElement element, boolean result)
default void
WebDriverListener. afterIsEnabled(WebElement element, boolean result)
default void
WebDriverListener. afterIsSelected(WebElement element, boolean result)
default void
WebDriverListener. afterSendKeys(WebElement element, java.lang.CharSequence... keysToSend)
default void
WebDriverListener. afterSubmit(WebElement element)
default void
WebDriverListener. beforeAnyWebElementCall(WebElement element, java.lang.reflect.Method method, java.lang.Object[] args)
void
AbstractWebDriverEventListener. beforeChangeValueOf(WebElement element, WebDriver driver, java.lang.CharSequence[] keysToSend)
Deprecated.void
WebDriverEventListener. beforeChangeValueOf(WebElement element, WebDriver driver, java.lang.CharSequence[] keysToSend)
Deprecated.Called beforeWebElement.clear()
,WebElement.sendKeys(...)
.default void
WebDriverListener. beforeClear(WebElement element)
default void
WebDriverListener. beforeClick(WebElement element)
void
AbstractWebDriverEventListener. beforeClickOn(WebElement element, WebDriver driver)
Deprecated.void
WebDriverEventListener. beforeClickOn(WebElement element, WebDriver driver)
Deprecated.Called beforeWebElement.click()
.void
AbstractWebDriverEventListener. beforeFindBy(By by, WebElement element, WebDriver driver)
Deprecated.void
WebDriverEventListener. beforeFindBy(By by, WebElement element, WebDriver driver)
Deprecated.Called beforeWebDriver.findElement(...)
, orWebDriver.findElements(...)
, orWebElement.findElement(...)
, orWebElement.findElements(...)
.default void
WebDriverListener. beforeFindElement(WebElement element, By locator)
default void
WebDriverListener. beforeFindElements(WebElement element, By locator)
default void
WebDriverListener. beforeGetAttribute(WebElement element, java.lang.String name)
default void
WebDriverListener. beforeGetCssValue(WebElement element, java.lang.String propertyName)
default void
WebDriverListener. beforeGetLocation(WebElement element)
default void
WebDriverListener. beforeGetSize(WebElement element)
default void
WebDriverListener. beforeGetTagName(WebElement element)
void
AbstractWebDriverEventListener. beforeGetText(WebElement element, WebDriver driver)
Deprecated.void
WebDriverEventListener. beforeGetText(WebElement element, WebDriver driver)
Deprecated.Called beforegetText()
method is being calleddefault void
WebDriverListener. beforeGetText(WebElement element)
default void
WebDriverListener. beforeIsDisplayed(WebElement element)
default void
WebDriverListener. beforeIsEnabled(WebElement element)
default void
WebDriverListener. beforeIsSelected(WebElement element)
default void
WebDriverListener. beforeSendKeys(WebElement element, java.lang.CharSequence... keysToSend)
default void
WebDriverListener. beforeSubmit(WebElement element)
Method parameters in org.openqa.selenium.support.events with type arguments of type WebElement Modifier and Type Method Description default void
WebDriverListener. afterFindElements(WebDriver driver, By locator, java.util.List<WebElement> result)
default void
WebDriverListener. afterFindElements(WebElement element, By locator, java.util.List<WebElement> result)
-
Uses of WebElement in org.openqa.selenium.support.locators
Methods in org.openqa.selenium.support.locators that return types with arguments of type WebElement Modifier and Type Method Description java.util.List<WebElement>
RelativeLocator.RelativeBy. findElements(SearchContext context)
Methods in org.openqa.selenium.support.locators with parameters of type WebElement Modifier and Type Method Description RelativeLocator.RelativeBy
RelativeLocator.RelativeBy. above(WebElement element)
RelativeLocator.RelativeBy
RelativeLocator.RelativeBy. below(WebElement element)
RelativeLocator.RelativeBy
RelativeLocator.RelativeBy. near(WebElement element)
RelativeLocator.RelativeBy
RelativeLocator.RelativeBy. near(WebElement element, int atMostDistanceInPixels)
RelativeLocator.RelativeBy
RelativeLocator.RelativeBy. toLeftOf(WebElement element)
RelativeLocator.RelativeBy
RelativeLocator.RelativeBy. toRightOf(WebElement element)
-
Uses of WebElement in org.openqa.selenium.support.pagefactory
Methods in org.openqa.selenium.support.pagefactory that return WebElement Modifier and Type Method Description WebElement
AjaxElementLocator. findElement()
Find the element.WebElement
ByAll. findElement(SearchContext context)
WebElement
ByChained. findElement(SearchContext context)
WebElement
DefaultElementLocator. findElement()
Find the element.WebElement
ElementLocator. findElement()
protected WebElement
DefaultFieldDecorator. proxyForLocator(java.lang.ClassLoader loader, ElementLocator locator)
Methods in org.openqa.selenium.support.pagefactory that return types with arguments of type WebElement Modifier and Type Method Description java.util.List<WebElement>
AjaxElementLocator. findElements()
Find the element list.java.util.List<WebElement>
ByAll. findElements(SearchContext context)
java.util.List<WebElement>
ByChained. findElements(SearchContext context)
java.util.List<WebElement>
DefaultElementLocator. findElements()
Find the element list.java.util.List<WebElement>
ElementLocator. findElements()
protected java.util.List<WebElement>
DefaultFieldDecorator. proxyForListLocator(java.lang.ClassLoader loader, ElementLocator locator)
Methods in org.openqa.selenium.support.pagefactory with parameters of type WebElement Modifier and Type Method Description protected 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
Methods in org.openqa.selenium.support.ui that return WebElement Modifier and Type Method Description WebElement
ISelect. getFirstSelectedOption()
WebElement
Select. getFirstSelectedOption()
WebElement
Select. getWrappedElement()
Methods in org.openqa.selenium.support.ui that return types with arguments of type WebElement Modifier and Type Method Description static 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.java.util.List<WebElement>
ISelect. getAllSelectedOptions()
java.util.List<WebElement>
Select. getAllSelectedOptions()
java.util.List<WebElement>
ISelect. getOptions()
java.util.List<WebElement>
Select. getOptions()
static ExpectedCondition<java.util.List<WebElement>>
ExpectedConditions. numberOfElementsToBe(By locator, java.lang.Integer number)
An expectation for checking number of WebElements with given locatorstatic ExpectedCondition<java.util.List<WebElement>>
ExpectedConditions. numberOfElementsToBeLessThan(By locator, java.lang.Integer number)
An expectation for checking number of WebElements with given locator being less than defined numberstatic ExpectedCondition<java.util.List<WebElement>>
ExpectedConditions. numberOfElementsToBeMoreThan(By locator, java.lang.Integer number)
An expectation for checking number of WebElements with given locator being more than defined numberstatic ExpectedCondition<java.util.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<java.util.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<java.util.List<WebElement>>
ExpectedConditions. visibilityOfAllElements(java.util.List<WebElement> elements)
An expectation for checking that all elements present on the web page that match the locator are visible.static ExpectedCondition<java.util.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<java.util.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<java.util.List<WebElement>>
ExpectedConditions. visibilityOfNestedElementsLocatedBy(By parent, By childLocator)
An expectation for checking child WebElement as a part of parent element to be visiblestatic ExpectedCondition<java.util.List<WebElement>>
ExpectedConditions. visibilityOfNestedElementsLocatedBy(WebElement element, By childLocator)
An expectation for checking child WebElement as a part of parent element to be visibleMethods in org.openqa.selenium.support.ui with parameters of type WebElement Modifier and Type Method Description static ExpectedCondition<java.lang.Boolean>
ExpectedConditions. attributeContains(WebElement element, java.lang.String attribute, java.lang.String value)
An expectation for checking WebElement with given locator has attribute which contains specific valuestatic ExpectedCondition<java.lang.Boolean>
ExpectedConditions. attributeToBe(WebElement element, java.lang.String attribute, java.lang.String value)
An expectation for checking given WebElement has attribute with a specific valuestatic ExpectedCondition<java.lang.Boolean>
ExpectedConditions. attributeToBeNotEmpty(WebElement element, java.lang.String attribute)
An expectation for checking WebElement any non empty value for given attributestatic ExpectedCondition<java.lang.Boolean>
ExpectedConditions. domAttributeToBe(WebElement element, java.lang.String attribute, java.lang.String value)
An expectation for checking given WebElement has DOM attribute with a specific valuestatic ExpectedCondition<java.lang.Boolean>
ExpectedConditions. domPropertyToBe(WebElement element, java.lang.String property, java.lang.String value)
An expectation for checking given WebElement has DOM property with a specific valuestatic ExpectedCondition<java.lang.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<java.lang.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<java.lang.Boolean>
ExpectedConditions. invisibilityOf(WebElement element)
An expectation for checking the element to be invisiblestatic ExpectedCondition<java.lang.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<java.lang.Boolean>
ExpectedConditions. stalenessOf(WebElement element)
Wait until an element is no longer attached to the DOM.static ExpectedCondition<java.lang.Boolean>
ExpectedConditions. textToBePresentInElement(WebElement element, java.lang.String text)
An expectation for checking if the given text is present in the specified element.static ExpectedCondition<java.lang.Boolean>
ExpectedConditions. textToBePresentInElementValue(WebElement element, java.lang.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<java.util.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<java.util.List<WebElement>>
ExpectedConditions. visibilityOfNestedElementsLocatedBy(WebElement element, By childLocator)
An expectation for checking child WebElement as a part of parent element to be visibleMethod parameters in org.openqa.selenium.support.ui with type arguments of type WebElement Modifier and Type Method Description static ExpectedCondition<java.lang.Boolean>
ExpectedConditions. invisibilityOfAllElements(java.util.List<WebElement> elements)
An expectation for checking all elements from given list to be invisiblestatic ExpectedCondition<java.util.List<WebElement>>
ExpectedConditions. visibilityOfAllElements(java.util.List<WebElement> elements)
An expectation for checking that all elements present on the web page that match the locator are visible.Constructors in org.openqa.selenium.support.ui with parameters of type WebElement Constructor Description Select(WebElement element)
Constructor.
-