Package co.verisoft.fw.utils.locators
Class AllBy
- java.lang.Object
-
- org.openqa.selenium.By
-
- co.verisoft.fw.utils.locators.AllBy
-
public class AllBy extends org.openqa.selenium.ByFind elements which comply to ALL the specified By objects.
This mechanism used to locate elements within a document using a series of lookups. This class will find all DOM elements that matches any of the locators in sequence. For example:
List<WebElement> myList = driver.findElements(AllBy.all(By.xpath("path1"),By.xpath("path2"));
will find all elements that match xpath "path1" AND 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AllByall(org.openqa.selenium.By... bys)List<org.openqa.selenium.WebElement>findElements(org.openqa.selenium.SearchContext context)
-
-
-
Method Detail
-
all
public static AllBy all(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
-
-