Package co.verisoft.fw.utils.locators
Class NotBy
- java.lang.Object
-
- org.openqa.selenium.By
-
- co.verisoft.fw.utils.locators.NotBy
-
public class NotBy extends org.openqa.selenium.ByFind elements which do NOT has a specific
Bylocator.
This mechanism used to locate elements within a document using a single lookup. This class will find ALL DOM elements which does not contain the search specified. For example:
List<WebElement> myList = driver.findElements(NotBy.not(By.xpath("path1"));
will find all elements that does not match xpath "path1" 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 List<org.openqa.selenium.WebElement>findElements(org.openqa.selenium.SearchContext context)static org.openqa.selenium.Bynot(org.openqa.selenium.By by)
-
-
-
Method Detail
-
not
public static org.openqa.selenium.By not(org.openqa.selenium.By by)
- Parameters:
by-Byobject to be used whenfindElementsis called.}- Returns:
object with the locator to avoidBy
-
findElements
public List<org.openqa.selenium.WebElement> findElements(org.openqa.selenium.SearchContext context)
- Specified by:
findElementsin classorg.openqa.selenium.By
-
-