Package org.openqa.selenium
Class By.ById
- java.lang.Object
-
- org.openqa.selenium.By
-
- org.openqa.selenium.By.ById
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- By
public static class By.ById extends By implements java.io.Serializable
- See Also:
- Serialized Form
-
-
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
-
-
Constructor Summary
Constructors Constructor Description ById(java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebElement
findElement(SearchContext context)
Find a single element.java.util.List<WebElement>
findElements(SearchContext context)
Find many elements.java.lang.String
toString()
-
-
-
Method Detail
-
findElements
public java.util.List<WebElement> findElements(SearchContext context)
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.
-
findElement
public WebElement findElement(SearchContext context)
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.
-
-