October 2018
Intermediate to advanced
192 pages
5h 12m
English
The By class is an abstract class that has eight static methods and eight inner classes. Let's understand the structure of the By class.
The following code skeleton shows a fragment of the structure of the By class:
public abstract class By { public static By id(String id); public static By cssSelector(String css); public static By name(String name); public static By linkText(String text); public static By className(String className); public static By tagName(String tagName); public static By partialLinkText(String partialLinkText); public static By xpath(String xpath); public static class ById extends By { WebElement findElement(By by); List <WebElement> findElements(By by); }}
Read now
Unlock full access