Uses of Class
org.openqa.selenium.By
Packages that useBy
Package
Description
Uses ofBy inorg.openqa.selenium
Subclasses ofBy inorg.openqa.seleniumModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classMethods inorg.openqa.selenium that returnByModifier and TypeMethodDescriptionstaticByFind elements based on the value of the "class" attribute.staticByBy.cssSelector(String cssSelector) Find elements via the driver's underlying W3C Selector engine.staticBystaticBystaticBystaticByBy.partialLinkText(String partialLinkText) staticBystaticByMethods inorg.openqa.selenium with parameters of typeByModifier and TypeMethodDescriptionSearchContext.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.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.Uses ofBy inorg.openqa.selenium.remote
Methods inorg.openqa.selenium.remote with parameters of typeByModifier and TypeMethodDescriptionRemoteWebDriver.findElement(By locator) RemoteWebElement.findElement(By locator) RemoteWebDriver.findElements(By locator) RemoteWebDriver.findElements(SearchContext context,BiFunction<String, Object, CommandPayload> findCommand,By locator) RemoteWebElement.findElements(By locator) Uses ofBy inorg.openqa.selenium.remote.locators
Methods inorg.openqa.selenium.remote.locators that returnByUses ofBy inorg.openqa.selenium.support
Subclasses ofBy inorg.openqa.selenium.supportMethods inorg.openqa.selenium.support that returnByModifier and TypeMethodDescriptionabstractByprotectedByAbstractFindByBuilder.buildByFromFindBy(FindBy findBy) protectedByAbstractFindByBuilder.buildByFromLongFindBy(FindBy findBy) protectedByAbstractFindByBuilder.buildByFromShortFindBy(FindBy findBy) abstractByUses ofBy inorg.openqa.selenium.support.events
Methods inorg.openqa.selenium.support.events with parameters of typeByModifier and TypeMethodDescriptiondefault 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 afterWebElement.findElement(By)is called.default 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 afterWebElement.findElements(By)is called.default voidWebDriverListener.beforeFindElement(WebDriver driver,By locator) This method will be called beforeWebDriver.findElement(By)is called.default voidWebDriverListener.beforeFindElement(WebElement element,By locator) This action will be performed each time beforeWebElement.findElement(By)is called.default voidWebDriverListener.beforeFindElements(WebDriver driver,By locator) This method will be called beforeWebDriver.findElements(By)is called.default voidWebDriverListener.beforeFindElements(WebElement element,By locator) This action will be performed each time beforeWebElement.findElements(By)is called.Uses ofBy inorg.openqa.selenium.support.locators
Subclasses ofBy inorg.openqa.selenium.support.locatorsMethods inorg.openqa.selenium.support.locators that returnByMethods inorg.openqa.selenium.support.locators with parameters of typeByModifier and TypeMethodDescriptionRelativeLocator.RelativeBy.straightAbove(By locator) RelativeLocator.RelativeBy.straightBelow(By locator) RelativeLocator.RelativeBy.straightLeftOf(By locator) RelativeLocator.RelativeBy.straightRightOf(By locator) Start of a relative locator, finding elements by tag name.Uses ofBy inorg.openqa.selenium.support.pagefactory
Subclasses ofBy inorg.openqa.selenium.support.pagefactoryModifier and TypeClassDescriptionclassMechanism used to locate elements within a document using a series of lookups.classMechanism used to locate elements within a document using a series of other lookups.Methods inorg.openqa.selenium.support.pagefactory that returnByModifier and TypeMethodDescriptionabstractByAbstractAnnotations.buildBy()Defines how to transform given object (field, class, etc.) intoByclass used by webdriver to locate elements.Annotations.buildBy()Defines how to transform given object (field, class, etc.) intoByclass used by webdriver to locate elements.protectedByAnnotations.buildByFromDefault()Constructors inorg.openqa.selenium.support.pagefactory with parameters of typeByUses ofBy inorg.openqa.selenium.support.ui
Methods inorg.openqa.selenium.support.ui with parameters of typeByModifier and TypeMethodDescriptionstaticExpectedCondition<Boolean> ExpectedConditions.attributeContains(By locator,String attribute,String value) An expectation for checking WebElement with given locator has attribute which contains specific valuestaticExpectedCondition<Boolean> ExpectedConditions.attributeToBe(By locator,String attribute,String value) An expectation for checking WebElement with given locator has attribute with a specific valuestaticExpectedCondition<Boolean> ExpectedConditions.elementSelectionStateToBe(By locator, boolean selected) staticExpectedCondition<@NullableWebElement> ExpectedConditions.elementToBeClickable(By locator) An expectation for checking an element is visible and enabled such that you can click it.staticExpectedCondition<Boolean> ExpectedConditions.elementToBeSelected(By locator) staticExpectedCondition<@NullableWebDriver> ExpectedConditions.frameToBeAvailableAndSwitchToIt(By locator) An expectation for checking whether the given frame is available to switch to.staticExpectedCondition<Boolean> ExpectedConditions.invisibilityOfElementLocated(By locator) An expectation for checking that an element is either invisible or not present on the DOM.staticExpectedCondition<Boolean> ExpectedConditions.invisibilityOfElementWithText(By locator,String text) An expectation for checking that an element with text is either invisible or not present on the DOM.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<Boolean> ExpectedConditions.textMatches(By locator,Pattern pattern) An expectation for checking WebElement with given locator has text with a value as a part of itstaticExpectedCondition<Boolean> An expectation for checking WebElement with given locator has specific textstaticExpectedCondition<Boolean> ExpectedConditions.textToBePresentInElementLocated(By locator,String text) An expectation for checking if the given text is present in the element that matches the given locator.staticExpectedCondition<Boolean> ExpectedConditions.textToBePresentInElementValue(By locator,String text) An expectation for checking if the given text is present in the specified elements value attribute.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 visible