Package org.openqa.selenium.support
Class ByIdOrName
java.lang.Object
org.openqa.selenium.By
org.openqa.selenium.support.ByIdOrName
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openqa.selenium.By
By.ByClassName, By.ByCssSelector, By.ById, By.ByLinkText, By.ByName, By.ByPartialLinkText, By.ByTagName, By.ByXPath, By.Remotable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindElement
(SearchContext context) Find a single element.findElements
(SearchContext context) Find many elements.toString()
Methods inherited from class org.openqa.selenium.By
className, cssSelector, equals, getJavascriptExecutor, getWebDriver, hashCode, id, linkText, name, partialLinkText, tagName, xpath
-
Constructor Details
-
ByIdOrName
-
-
Method Details
-
findElement
Description copied from class:By
Find a single element. Override this method if necessary.- Overrides:
findElement
in classBy
- Parameters:
context
- A context to use to find the element.- Returns:
- The WebElement that matches the selector.
-
findElements
Description copied from class:By
Find many elements.- Specified by:
findElements
in classBy
- Parameters:
context
- A context to use to find the elements.- Returns:
- A list of WebElements matching the selector.
-
toString
-