Package co.verisoft.fw.utils.locators
Class AnyBy
- java.lang.Object
-
- org.openqa.selenium.By
-
- co.verisoft.fw.utils.locators.AnyBy
-
public class AnyBy extends org.openqa.selenium.ByFind elements which comply to ANY of the specified By objects.
This mechanism used to locate elements within a document using a series of lookups. This class will find any DOM elements that matches any of the locators in sequence. For example:
List<WebElement> myList = driver.findElements(AnyBy.any(By.xpath("path1"),By.xpath("path2"));
will find all elements that match EITHER xpath "path1" or xpath "path2" and return aListofWebElement.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openqa.selenium.By
org.openqa.selenium.By.ByClassName, org.openqa.selenium.By.ByCssSelector, org.openqa.selenium.By.ById, org.openqa.selenium.By.ByLinkText, org.openqa.selenium.By.ByName, org.openqa.selenium.By.ByPartialLinkText, org.openqa.selenium.By.ByTagName, org.openqa.selenium.By.ByXPath, org.openqa.selenium.By.Remotable
-
-
Constructor Summary
Constructors Constructor Description AnyBy(org.openqa.selenium.By... bys)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.openqa.selenium.Byany(org.openqa.selenium.By... bys)List<org.openqa.selenium.WebElement>findElements(org.openqa.selenium.SearchContext context)
-
-
-
Method Detail
-
any
public static org.openqa.selenium.By any(org.openqa.selenium.By... bys)
- Parameters:
bys- list ofByobjects to be used whenfindElementsis called.}- Returns:
object with all the locators in itBy
-
findElements
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.SearchContext context)
- Specified by:
findElementsin classorg.openqa.selenium.By
-
-