com.atlassian.webdriver.utils.by
Class DeferredBy

java.lang.Object
  extended by org.openqa.selenium.By
      extended by com.atlassian.webdriver.utils.by.DeferredBy

public abstract class DeferredBy
extends org.openqa.selenium.By

Looks for an element by using the WebDriver wait and ElementLocated condition. It will wait up to 20 seconds for the element to be located.

Since:
2.0

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
 
Constructor Summary
DeferredBy()
           
 
Method Summary
static org.openqa.selenium.By className(String className)
          Finds elements based on the value of the "class" attribute.
static org.openqa.selenium.By cssSelector(String selector)
          Finds elements via the driver's underlying W3 Selector engine.
 boolean equals(Object o)
           
 int hashCode()
           
static DeferredBy id(String id)
           
static org.openqa.selenium.By linkText(String linkText)
           
static org.openqa.selenium.By name(String name)
           
static org.openqa.selenium.By partialLinkText(String linkText)
           
static org.openqa.selenium.By tagName(String name)
           
static org.openqa.selenium.By xpath(String xpathExpression)
           
 
Methods inherited from class org.openqa.selenium.By
findElement, findElements, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeferredBy

public DeferredBy()
Method Detail

id

public static DeferredBy id(String id)
Parameters:
id - The value of the "id" attribute to search for
Returns:
a By which locates elements by the value of the "id" attribute.

linkText

public static org.openqa.selenium.By linkText(String linkText)
Parameters:
linkText - The exact text to match against
Returns:
a By which locates A elements by the exact text it displays

partialLinkText

public static org.openqa.selenium.By partialLinkText(String linkText)
Parameters:
linkText - The text to match against
Returns:
a By which locates A elements that contain the given link text

name

public static org.openqa.selenium.By name(String name)
Parameters:
name - The value of the "name" attribute to search for
Returns:
a By which locates elements by the value of the "name" attribute.

tagName

public static org.openqa.selenium.By tagName(String name)
Parameters:
name - The element's tagName
Returns:
a By which locates elements by their tag name

xpath

public static org.openqa.selenium.By xpath(String xpathExpression)
Parameters:
xpathExpression - The xpath to use
Returns:
a By which locates elements via XPath

className

public static org.openqa.selenium.By className(String className)
Finds elements based on the value of the "class" attribute. If an element has many classes then this will match against each of them. For example if the value is "one two onone", then the following "className"s will match: "one" and "two"

Parameters:
className - The value of the "class" attribute to search for
Returns:
a By which locates elements by the value of the "class" attribute.

cssSelector

public static org.openqa.selenium.By cssSelector(String selector)
Finds elements via the driver's underlying W3 Selector engine. If the browser does not implement the Selector API an exception will be thrown.


equals

public boolean equals(Object o)
Overrides:
equals in class org.openqa.selenium.By

hashCode

public int hashCode()
Overrides:
hashCode in class org.openqa.selenium.By


Copyright © 2014 Atlassian. All rights reserved.