Uses of Interface
org.openqa.selenium.WebElement
Packages that useWebElement
Package
Description
Uses ofWebElement inorg.openqa.selenium
Methods inorg.openqa.selenium that returnWebElementModifier 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 inorg.openqa.selenium that return types with arguments of typeWebElementModifier and TypeMethodDescriptionabstractList<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 inorg.openqa.selenium with parameters of typeWebElementModifier and TypeMethodDescriptionWebDriver.TargetLocator.frame(WebElement frameElement) Select a frame using its previously locatedWebElement.Uses ofWebElement inorg.openqa.selenium.devtools.events
Methods inorg.openqa.selenium.devtools.events that returnWebElementConstructors inorg.openqa.selenium.devtools.events with parameters of typeWebElementModifierConstructorDescriptionDomMutationEvent(WebElement element,String attributeName,String currentValue,String oldValue) Uses ofWebElement inorg.openqa.selenium.interactions
Methods inorg.openqa.selenium.interactions with parameters of typeWebElementModifier 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.staticPointerInput.OriginPointerInput.Origin.fromElement(WebElement element) staticWheelInput.ScrollOriginWheelInput.ScrollOrigin.fromElement(WebElement element) staticWheelInput.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 ofWebElement inorg.openqa.selenium.remote
Classes inorg.openqa.selenium.remote that implementWebElementMethods inorg.openqa.selenium.remote that returnWebElementModifier and TypeMethodDescriptionRemoteWebDriver.RemoteTargetLocator.activeElement()RemoteWebDriver.findElement(By locator) RemoteWebElement.findElement(By locator) DomMutation.getElement()Methods inorg.openqa.selenium.remote that return types with arguments of typeWebElementModifier and TypeMethodDescriptionRemoteWebDriver.findElements(By locator) RemoteWebDriver.findElements(SearchContext context,BiFunction<String, Object, CommandPayload> findCommand,By locator) RemoteWebElement.findElements(By locator) Methods inorg.openqa.selenium.remote with parameters of typeWebElementModifier and TypeMethodDescriptionRemoteWebDriver.RemoteTargetLocator.frame(WebElement frameElement) protected voidRemoteWebDriver.setFoundBy(SearchContext context,WebElement element,String by,String using) Constructors inorg.openqa.selenium.remote with parameters of typeWebElementModifierConstructorDescriptionDomMutation(WebElement element,String attributeName,String currentValue,String oldValue) Uses ofWebElement inorg.openqa.selenium.support
Methods inorg.openqa.selenium.support that returnWebElementMethods inorg.openqa.selenium.support that return types with arguments of typeWebElementUses ofWebElement inorg.openqa.selenium.support.decorators
Methods inorg.openqa.selenium.support.decorators that return types with arguments of typeWebElementMethods inorg.openqa.selenium.support.decorators with parameters of typeWebElementUses ofWebElement inorg.openqa.selenium.support.events
Methods inorg.openqa.selenium.support.events with parameters of typeWebElementModifier 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 inorg.openqa.selenium.support.events with type arguments of typeWebElementModifier 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 ofWebElement inorg.openqa.selenium.support.locators
Methods inorg.openqa.selenium.support.locators that return types with arguments of typeWebElementMethods inorg.openqa.selenium.support.locators with parameters of typeWebElementModifier 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 ofWebElement inorg.openqa.selenium.support.pagefactory
Methods inorg.openqa.selenium.support.pagefactory that returnWebElementModifier and TypeMethodDescriptionAjaxElementLocator.findElement()Find the element.ByAll.findElement(SearchContext context) ByChained.findElement(SearchContext context) DefaultElementLocator.findElement()Find the element.ElementLocator.findElement()protectedWebElementDefaultFieldDecorator.proxyForLocator(ClassLoader loader,ElementLocator locator) Methods inorg.openqa.selenium.support.pagefactory that return types with arguments of typeWebElementModifier and TypeMethodDescriptionAjaxElementLocator.findElements()Find the element list.ByAll.findElements(SearchContext context) ByChained.findElements(SearchContext context) DefaultElementLocator.findElements()Find the element list.ElementLocator.findElements()protectedList<WebElement> DefaultFieldDecorator.proxyForListLocator(ClassLoader loader,ElementLocator locator) Methods inorg.openqa.selenium.support.pagefactory with parameters of typeWebElementModifier and TypeMethodDescriptionprotected booleanAjaxElementLocator.isElementUsable(WebElement element) By default, elements are considered "found" if they are in the DOM.Uses ofWebElement inorg.openqa.selenium.support.ui
Methods inorg.openqa.selenium.support.ui that returnWebElementModifier and TypeMethodDescriptionISelect.getFirstSelectedOption()Select.getFirstSelectedOption()Select.getWrappedElement()Methods inorg.openqa.selenium.support.ui that return types with arguments of typeWebElementModifier and TypeMethodDescriptionstaticExpectedCondition<@NullableWebElement> ExpectedConditions.elementToBeClickable(By locator) An expectation for checking an element is visible and enabled such that you can click it.staticExpectedCondition<@NullableWebElement> 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()staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.numberOfElementsToBe(By locator,Integer number) An expectation for checking number of WebElements with given locatorstaticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.numberOfElementsToBeLessThan(By locator,Integer number) An expectation for checking number of WebElements with given locator being less than defined numberstaticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.numberOfElementsToBeMoreThan(By locator,Integer number) An expectation for checking number of WebElements with given locator being more than defined numberstaticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.presenceOfAllElementsLocatedBy(By locator) An expectation for checking that there is at least one element present on a web page.staticExpectedCondition<WebElement> ExpectedConditions.presenceOfElementLocated(By locator) An expectation for checking that an element is present on the DOM of a page.staticExpectedCondition<WebElement> ExpectedConditions.presenceOfNestedElementLocatedBy(By locator,By childLocator) An expectation for checking child WebElement as a part of parent element to presentstaticExpectedCondition<WebElement> ExpectedConditions.presenceOfNestedElementLocatedBy(WebElement element,By childLocator) An expectation for checking child WebElement as a part of parent element to be presentstaticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.presenceOfNestedElementsLocatedBy(By parent,By childLocator) An expectation for checking child WebElement as a part of parent element to presentstaticExpectedCondition<@NullableWebElement> ExpectedConditions.visibilityOf(WebElement element) An expectation for checking that an element, known to be present on the DOM of a page, is visible.staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfAllElements(List<WebElement> elements) An expectation for checking that all elements present on the web page that match the locator are visible.staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfAllElements(WebElement... elements) An expectation for checking that all elements present on the web page that match the locator are visible.staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfAllElementsLocatedBy(By locator) An expectation for checking that all elements present on the web page that match the locator are visible.staticExpectedCondition<@NullableWebElement> ExpectedConditions.visibilityOfElementLocated(By locator) An expectation for checking that an element is present on the DOM of a page and visible.staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfNestedElementsLocatedBy(By parent,By childLocator) An expectation for checking child WebElement as a part of parent element to be visiblestaticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfNestedElementsLocatedBy(WebElement element,By childLocator) An expectation for checking child WebElement as a part of parent element to be visibleMethods inorg.openqa.selenium.support.ui with parameters of typeWebElementModifier and TypeMethodDescriptionstaticExpectedCondition<Boolean> ExpectedConditions.attributeContains(WebElement element,String attribute,String value) An expectation for checking WebElement with given locator has attribute which contains specific valuestaticExpectedCondition<Boolean> ExpectedConditions.attributeToBe(WebElement element,String attribute,String value) An expectation for checking given WebElement has attribute with a specific valuestaticExpectedCondition<Boolean> ExpectedConditions.attributeToBeNotEmpty(WebElement element,String attribute) An expectation for checking WebElement any non empty value for given attributestaticExpectedCondition<Boolean> ExpectedConditions.domAttributeToBe(WebElement element,String attribute,String value) An expectation for checking given WebElement has DOM attribute with a specific valuestaticExpectedCondition<Boolean> ExpectedConditions.domPropertyToBe(WebElement element,String property,String value) An expectation for checking given WebElement has DOM property with a specific valuestaticExpectedCondition<Boolean> ExpectedConditions.elementSelectionStateToBe(WebElement element, boolean selected) An expectation for checking if the given element is selected.staticExpectedCondition<@NullableWebElement> ExpectedConditions.elementToBeClickable(WebElement element) An expectation for checking an element is visible and enabled such that you can click it.staticExpectedCondition<Boolean> ExpectedConditions.elementToBeSelected(WebElement element) An expectation for checking if the given element is selected.staticExpectedCondition<@NullableWebDriver> ExpectedConditions.frameToBeAvailableAndSwitchToIt(WebElement frameLocator) An expectation for checking whether the given frame is available to switch to.staticExpectedCondition<Boolean> ExpectedConditions.invisibilityOf(WebElement element) An expectation for checking the element to be invisiblestaticExpectedCondition<Boolean> ExpectedConditions.invisibilityOfAllElements(WebElement... elements) An expectation for checking all elements from given list to be invisiblestaticExpectedCondition<WebElement> ExpectedConditions.presenceOfNestedElementLocatedBy(WebElement element,By childLocator) An expectation for checking child WebElement as a part of parent element to be presentstaticExpectedCondition<Boolean> ExpectedConditions.stalenessOf(WebElement element) Wait until an element is no longer attached to the DOM.staticExpectedCondition<Boolean> ExpectedConditions.textToBePresentInElement(WebElement element,String text) An expectation for checking if the given text is present in the specified element.staticExpectedCondition<Boolean> ExpectedConditions.textToBePresentInElementValue(WebElement element,String text) An expectation for checking if the given text is present in the specified elements value attribute.staticExpectedCondition<@NullableWebElement> ExpectedConditions.visibilityOf(WebElement element) An expectation for checking that an element, known to be present on the DOM of a page, is visible.staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfAllElements(WebElement... elements) An expectation for checking that all elements present on the web page that match the locator are visible.staticExpectedCondition<@NullableList<WebElement>> ExpectedConditions.visibilityOfNestedElementsLocatedBy(WebElement element,By childLocator) An expectation for checking child WebElement as a part of parent element to be visibleMethod parameters inorg.openqa.selenium.support.ui with type arguments of typeWebElementModifier and TypeMethodDescriptionstaticExpectedCondition<Boolean> ExpectedConditions.invisibilityOfAllElements(List<WebElement> elements) An expectation for checking all elements from given list to be invisiblestaticExpectedCondition<@NullableList<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 inorg.openqa.selenium.support.ui with parameters of typeWebElement