Package co.verisoft.fw.utils.locators
Class ElementBy
- java.lang.Object
-
- co.verisoft.fw.utils.locators.ElementBy
-
public final class ElementBy extends Object
A set of static methods to extend the search mechanism.
It is used to simplify commonly usedFindBy. For example:
WebElement myElement = driver.findElement(ElementBy.partialText("searchText"));
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.openqa.selenium.BypartialText(String text)Finds an element by using any part of it's tag value.
-
-
-
Method Detail
-
partialText
public static org.openqa.selenium.By partialText(String text)
Finds an element by using any part of it's tag value. For example -<tagName>value</tagName>can be discovered by "value" or "val" using the following code:
List<WebElement> myList = driver.findElements(ElementBy.partialText("val"));- Parameters:
text- the string to be searched- Returns:
- a By object with the string to be searched, ready to be sent to findElement or findElements
-
-