Package org.openqa.selenium
Class By.ByClassName
java.lang.Object
org.openqa.selenium.By
org.openqa.selenium.By.ByClassName
- All Implemented Interfaces:
By.Remotable
- Enclosing class:
By
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.RemotableNested classes/interfaces inherited from interface org.openqa.selenium.By.Remotable
By.Remotable.ParametersConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionfindElement(SearchContext context) Find a single element.findElements(SearchContext context) Find many elements.toJson()toString()Methods inherited from class org.openqa.selenium.By
className,cssSelector,equals,getJavascriptExecutor,getWebDriver,hashCode,id,linkText,name,partialLinkText,tagName,xpath
Constructor Details
ByClassName
Method Details
toString
findElement
Description copied from class:ByFind a single element. Override this method if necessary.- Overrides:
findElementin classBy- Parameters:
context- A context to use to find the element.- Returns:
- The WebElement that matches the selector.
findElements
Description copied from class:ByFind many elements.- Specified by:
findElementsin classBy- Parameters:
context- A context to use to find the elements.- Returns:
- A list of WebElements matching the selector.
getRemoteParameters
- Specified by:
getRemoteParametersin interfaceBy.Remotable
toJson