Uses of Interface
org.openqa.selenium.WebElement
Packages that use WebElement
Package
Description
-
Uses of WebElement in org.openqa.selenium
Methods in org.openqa.selenium that return WebElementModifier 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 firstWebElementusing the given method.WebDriver.findElement(By by) Find the firstWebElementusing the given method.WebElement.findElement(By by) Find the firstWebElementusing the given method.WrapsElement.getWrappedElement()Methods in org.openqa.selenium that return types with arguments of type WebElementModifier 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.Methods in org.openqa.selenium with parameters of type WebElementModifier and TypeMethodDescriptionWebDriver.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 WebElementConstructors in org.openqa.selenium.devtools.events with parameters of type WebElementModifierConstructorDescriptionDomMutationEvent(WebElement element, String attributeName, String currentValue, String oldValue) -
Uses of WebElement in org.openqa.selenium.interactions
Methods in org.openqa.selenium.interactions with parameters of type WebElementModifier 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.OriginPointerInput.Origin.fromElement(WebElement element) static WheelInput.ScrollOriginWheelInput.ScrollOrigin.fromElement(WebElement element) static WheelInput.ScrollOriginWheelInput.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
Classes in org.openqa.selenium.remote that implement WebElementMethods in org.openqa.selenium.remote that return WebElementModifier and TypeMethodDescriptionRemoteWebDriver.RemoteTargetLocator.activeElement()RemoteWebDriver.findElement(By locator) RemoteWebElement.findElement(By locator) DomMutation.getElement()Methods in org.openqa.selenium.remote that return types with arguments of type WebElementModifier and TypeMethodDescriptionRemoteWebDriver.findElements(By locator) RemoteWebDriver.findElements(SearchContext context, BiFunction<String, Object, CommandPayload> findCommand, By locator) RemoteWebElement.findElements(By locator) Methods in org.openqa.selenium.remote with parameters of type WebElementModifier and TypeMethodDescriptionRemoteWebDriver.RemoteTargetLocator.frame(WebElement frameElement) protected voidRemoteWebDriver.setFoundBy(SearchContext context, WebElement element, String by, String using) Constructors in org.openqa.selenium.remote with parameters of type WebElementModifierConstructorDescriptionDomMutation(WebElement element, String attributeName, String currentValue, String oldValue) -
Uses of WebElement in org.openqa.selenium.support
Methods in org.openqa.selenium.support that return WebElementMethods in org.openqa.selenium.support that return types with arguments of type WebElement -
Uses of WebElement in org.openqa.selenium.support.decorators
Methods in org.openqa.selenium.support.decorators that return types with arguments of type WebElementMethods in org.openqa.selenium.support.decorators with parameters of type WebElement -
Uses of WebElement in org.openqa.selenium.support.events
Methods in org.openqa.selenium.support.events with parameters of type WebElementModifier and TypeMethodDescriptiondefault voidWebDriverListener.afterAnyWebElementCall(WebElement element, Method method, Object[] args, Object result) This method will be called after any method of aWebElementinstance is called.default voidWebDriverListener.afterClear(WebElement element) This action will be performed each time afterclear()is called.default voidWebDriverListener.afterClick(WebElement element) This action will be performed each time afterclick()is called.default voidWebDriverListener.afterFindElement(WebDriver driver, By locator, WebElement result) This method will be called afterWebDriver.findElement(By)is called.default voidWebDriverListener.afterFindElement(WebElement element, By locator, WebElement result) This action will be performed each time afterfindElement(By)is called.default voidWebDriverListener.afterFindElements(WebElement element, By locator, List<WebElement> result) This action will be performed each time afterfindElements(By)is called.default voidWebDriverListener.afterFrame(WebDriver.TargetLocator targetLocator, WebElement frameElement, WebDriver driver) This action will be performed each time afterWebDriver.TargetLocator.frame(WebElement)()} is called.default voidWebDriverListener.afterGetAttribute(WebElement element, String name, String result) This action will be performed each time aftergetAttribute(String)is called.default voidWebDriverListener.afterGetCssValue(WebElement element, String propertyName, String result) This action will be performed each time aftergetCssValue(String)is called.default voidWebDriverListener.afterGetLocation(WebElement element, Point result) This action will be performed each time aftergetLocation()is called.default <X> voidWebDriverListener.afterGetScreenshotAs(WebElement element, OutputType<X> target, X result) This method will be called afterTakesScreenshot.getScreenshotAs(OutputType)is called.default voidWebDriverListener.afterGetSize(WebElement element, Dimension result) This action will be performed each time aftergetSize()is called.default voidWebDriverListener.afterGetTagName(WebElement element, String result) This action will be performed each time aftergetTagName()is called.default voidWebDriverListener.afterGetText(WebElement element, String result) This action will be performed each time aftergetText()is called.default voidWebDriverListener.afterIsDisplayed(WebElement element, boolean result) This action will be performed each time afterisDisplayed()is called.default voidWebDriverListener.afterIsEnabled(WebElement element, boolean result) This action will be performed each time afterisEnabled()is called.default voidWebDriverListener.afterIsSelected(WebElement element, boolean result) This action will be performed each time afterisSelected()is called.default voidWebDriverListener.afterSendKeys(WebElement element, CharSequence... keysToSend) default voidWebDriverListener.afterSubmit(WebElement element) This action will be performed each time aftersubmit()is called.default voidWebDriverListener.beforeAnyWebElementCall(WebElement element, Method method, Object[] args) This method will be called before any method of aWebElementinstance is called.default voidWebDriverListener.beforeClear(WebElement element) This action will be performed each time beforeclear()is called.default voidWebDriverListener.beforeClick(WebElement element) This action will be performed each time beforeclick()is called.default voidWebDriverListener.beforeFindElement(WebElement element, By locator) This action will be performed each time beforefindElement(By)is called.default voidWebDriverListener.beforeFindElements(WebElement element, By locator) This action will be performed each time beforefindElements(By)is called.default voidWebDriverListener.beforeFrame(WebDriver.TargetLocator targetLocator, WebElement frameElement) This action will be performed each time beforeWebDriver.TargetLocator.frame(WebElement)()} is called.default voidWebDriverListener.beforeGetAttribute(WebElement element, String name) This action will be performed each time beforegetAttribute(String)is called.default voidWebDriverListener.beforeGetCssValue(WebElement element, String propertyName) This action will be performed each time beforegetCssValue(String)is called.default voidWebDriverListener.beforeGetLocation(WebElement element) This action will be performed each time beforegetLocation()is called.default <X> voidWebDriverListener.beforeGetScreenshotAs(WebElement element, OutputType<X> target) This method will be called beforeTakesScreenshot.getScreenshotAs(OutputType)is called.default voidWebDriverListener.beforeGetSize(WebElement element) This action will be performed each time beforegetSize()is called.default voidWebDriverListener.beforeGetTagName(WebElement element) This action will be performed each time beforegetTagName()is called.default voidWebDriverListener.beforeGetText(WebElement element) This action will be performed each time beforegetText()is called.default voidWebDriverListener.beforeIsDisplayed(WebElement element) This action will be performed each time beforeisDisplayed()is called.default voidWebDriverListener.beforeIsEnabled(WebElement element) This action will be performed each time beforeisEnabled()is called.default voidWebDriverListener.beforeIsSelected(WebElement element) This action will be performed each time beforeisSelected()is called.default voidWebDriverListener.beforeSendKeys(WebElement element, CharSequence... keysToSend) This action will be performed each time beforesendKeys(CharSequence...)is called.default voidWebDriverListener.beforeSubmit(WebElement element) This action will be performed each time beforesubmit()is called.Method parameters in org.openqa.selenium.support.events with type arguments of type WebElementModifier and TypeMethodDescriptiondefault voidWebDriverListener.afterFindElements(WebDriver driver, By locator, List<WebElement> result) This method will be called afterWebDriver.findElements(By)is called.default voidWebDriverListener.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
Methods in org.openqa.selenium.support.locators that return types with arguments of type WebElementMethods in org.openqa.selenium.support.locators with parameters of type WebElementModifier 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.straightAbove(WebElement element) RelativeLocator.RelativeBy.straightBelow(WebElement element) RelativeLocator.RelativeBy.straightLeftOf(WebElement element) RelativeLocator.RelativeBy.straightRightOf(WebElement element) RelativeLocator.RelativeBy.toLeftOf(WebElement element) RelativeLocator.RelativeBy.toRightOf(WebElement element) -
Uses of WebElement in org.openqa.selenium.support.pagefactory
Methods in org.openqa.selenium.support.pagefactory that return WebElementModifier and TypeMethodDescriptionAjaxElementLocator.findElement()Find the element.ByAll.findElement(SearchContext context) ByChained.findElement(SearchContext context) DefaultElementLocator.findElement()Find the element.ElementLocator.findElement()protected WebElementDefaultFieldDecorator.proxyForLocator(ClassLoader loader, ElementLocator locator) Methods in org.openqa.selenium.support.pagefactory that return types with arguments of type WebElementModifier 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) Methods in org.openqa.selenium.support.pagefactory with parameters of type WebElementModifier and TypeMethodDescriptionprotected booleanAjaxElementLocator.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 WebElementModifier and TypeMethodDescriptionISelect.getFirstSelectedOption()Select.getFirstSelectedOption()Select.getWrappedElement()Methods in org.openqa.selenium.support.ui that return types with arguments of type WebElementModifier 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 visibleMethods in org.openqa.selenium.support.ui with parameters of type WebElementModifier 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 visibleMethod parameters in org.openqa.selenium.support.ui with type arguments of type WebElementModifier 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.Constructors in org.openqa.selenium.support.ui with parameters of type WebElement