org.openqa.selenium.support.pagefactory
Class ByAll

java.lang.Object
  extended by org.openqa.selenium.By
      extended by org.openqa.selenium.support.pagefactory.ByAll

public class ByAll
extends By

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, e.g.

 driver.findElements(new ByAll(by1, by2))
 
will find all elements that match by1 and then all elements that match by2. This means that the list of elements returned may not be in document order.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.openqa.selenium.By
By.ByClassName, By.ByCssSelector, By.ById, By.ByLinkText, By.ByName, By.ByPartialLinkText, By.ByTagName, By.ByXPath
 
Constructor Summary
ByAll(By... bys)
           
 
Method Summary
 WebElement findElement(SearchContext context)
           
 List<WebElement> findElements(SearchContext context)
           
 String toString()
           
 
Methods inherited from class org.openqa.selenium.By
className, cssSelector, equals, hashCode, id, linkText, name, partialLinkText, tagName, xpath
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByAll

public ByAll(By... bys)
Method Detail

findElement

public WebElement findElement(SearchContext context)
Overrides:
findElement in class By

findElements

public List<WebElement> findElements(SearchContext context)
Specified by:
findElements in class By

toString

public String toString()
Overrides:
toString in class By


Copyright © 2013. All rights reserved.