Uses of Class
org.openqa.selenium.By
Packages that use By
Package
Description
-
Uses of By in org.openqa.selenium
Subclasses of By in org.openqa.seleniumModifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
static class
static class
static class
Methods in org.openqa.selenium that return ByModifier and TypeMethodDescriptionstatic By
Find elements based on the value of the "class" attribute.static By
By.cssSelector
(String cssSelector) Find elements via the driver's underlying W3C Selector engine.static By
static By
static By
static By
By.partialLinkText
(String partialLinkText) static By
static By
Methods in org.openqa.selenium with parameters of type ByModifier and TypeMethodDescriptionSearchContext.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.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 of By in org.openqa.selenium.remote
Methods in org.openqa.selenium.remote with parameters of type ByModifier 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 of By in org.openqa.selenium.remote.locators
Methods in org.openqa.selenium.remote.locators that return By -
Uses of By in org.openqa.selenium.support
Subclasses of By in org.openqa.selenium.supportMethods in org.openqa.selenium.support that return ByModifier and TypeMethodDescriptionabstract By
protected By
AbstractFindByBuilder.buildByFromFindBy
(FindBy findBy) protected By
AbstractFindByBuilder.buildByFromLongFindBy
(FindBy findBy) protected By
AbstractFindByBuilder.buildByFromShortFindBy
(FindBy findBy) abstract By
-
Uses of By in org.openqa.selenium.support.events
Methods in org.openqa.selenium.support.events with parameters of type ByModifier and TypeMethodDescriptiondefault void
WebDriverListener.afterFindElement
(WebDriver driver, By locator, WebElement result) This method will be called afterWebDriver.findElement(By)
is called.default void
WebDriverListener.afterFindElement
(WebElement element, By locator, WebElement result) This action will be performed each time afterWebElement.findElement(By)
is called.default void
WebDriverListener.afterFindElements
(WebDriver driver, By locator, List<WebElement> result) This method will be called afterWebDriver.findElements(By)
is called.default void
WebDriverListener.afterFindElements
(WebElement element, By locator, List<WebElement> result) This action will be performed each time afterWebElement.findElements(By)
is called.default void
WebDriverListener.beforeFindElement
(WebDriver driver, By locator) This method will be called beforeWebDriver.findElement(By)
is called.default void
WebDriverListener.beforeFindElement
(WebElement element, By locator) This action will be performed each time beforeWebElement.findElement(By)
is called.default void
WebDriverListener.beforeFindElements
(WebDriver driver, By locator) This method will be called beforeWebDriver.findElements(By)
is called.default void
WebDriverListener.beforeFindElements
(WebElement element, By locator) This action will be performed each time beforeWebElement.findElements(By)
is called. -
Uses of By in org.openqa.selenium.support.locators
Subclasses of By in org.openqa.selenium.support.locatorsMethods in org.openqa.selenium.support.locators that return ByMethods in org.openqa.selenium.support.locators with parameters of type ByModifier and TypeMethodDescriptionRelativeLocator.RelativeBy.straightAbove
(By locator) RelativeLocator.RelativeBy.straightBelow
(By locator) RelativeLocator.RelativeBy.straightLeftOf
(By locator) RelativeLocator.RelativeBy.straightRightOf
(By locator) static RelativeLocator.RelativeBy
Start of a relative locator, finding elements by tag name. -
Uses of By in org.openqa.selenium.support.pagefactory
Subclasses of By in org.openqa.selenium.support.pagefactoryModifier and TypeClassDescriptionclass
Mechanism used to locate elements within a document using a series of lookups.class
Mechanism used to locate elements within a document using a series of other lookups.Methods in org.openqa.selenium.support.pagefactory that return ByModifier and TypeMethodDescriptionabstract By
AbstractAnnotations.buildBy()
Defines how to transform given object (field, class, etc.) intoBy
class used by webdriver to locate elements.Annotations.buildBy()
Defines how to transform given object (field, class, etc.) intoBy
class used by webdriver to locate elements.protected By
Annotations.buildByFromDefault()
Constructors in org.openqa.selenium.support.pagefactory with parameters of type By -
Uses of By in org.openqa.selenium.support.ui
Methods in org.openqa.selenium.support.ui with parameters of type ByModifier and TypeMethodDescriptionstatic ExpectedCondition<Boolean>
ExpectedConditions.attributeContains
(By locator, String attribute, String value) An expectation for checking WebElement with given locator has attribute which contains specific valuestatic ExpectedCondition<Boolean>
ExpectedConditions.attributeToBe
(By locator, String attribute, String value) An expectation for checking WebElement with given locator has attribute with a specific valuestatic ExpectedCondition<Boolean>
ExpectedConditions.elementSelectionStateToBe
(By locator, boolean selected) 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<Boolean>
ExpectedConditions.elementToBeSelected
(By locator) static ExpectedCondition<WebDriver>
ExpectedConditions.frameToBeAvailableAndSwitchToIt
(By locator) An expectation for checking whether the given frame is available to switch to.static ExpectedCondition<Boolean>
ExpectedConditions.invisibilityOfElementLocated
(By locator) An expectation for checking that an element is either invisible or not present on the DOM.static ExpectedCondition<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.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<Boolean>
ExpectedConditions.textMatches
(By locator, Pattern pattern) An expectation for checking WebElement with given locator has text with a value as a part of itstatic ExpectedCondition<Boolean>
An expectation for checking WebElement with given locator has specific textstatic ExpectedCondition<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.static ExpectedCondition<Boolean>
ExpectedConditions.textToBePresentInElementValue
(By locator, String text) An expectation for checking if the given text is present in the specified elements value attribute.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 visible