|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openqa.selenium.By
org.seleniumhq.selenium.fluent.FluentBy
public abstract class FluentBy
Mechanism used to locate elements within a document. In order to create your own locating mechanisms, it is possible to subclass this class and override the protected methods as required, though it is expected that that all subclasses rely on the basic finding mechanisms provided through static methods of this class:
public WebElement findElement(WebDriver driver) {
WebElement element = driver.findElement(By.id(getSelector()));
if (element == null)
element = driver.findElement(By.name(getSelector());
return element;
}
| Nested Class Summary | |
|---|---|
static class |
FluentBy.ByAttribute
|
static class |
FluentBy.NotByAttribute
|
| 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 | |
|---|---|
FluentBy()
|
|
| Method Summary | |
|---|---|
static FluentBy.ByAttribute |
attribute(String name)
Finds elements by the presence of an attribute name irrespective of element name. |
static FluentBy.ByAttribute |
attribute(String name,
String value)
Finds elements by an named attribute matching a given value, irrespective of element name. |
void |
beforeFindElement(org.openqa.selenium.WebDriver driver)
|
static org.seleniumhq.selenium.fluent.FluentBy.ByComposite |
composite(org.openqa.selenium.By.ByTagName b0,
org.openqa.selenium.By.ByClassName b1)
Finds elements a composite of other By strategies |
static org.seleniumhq.selenium.fluent.FluentBy.ByComposite |
composite(org.openqa.selenium.By.ByTagName b0,
FluentBy.ByAttribute b1)
|
static org.seleniumhq.selenium.fluent.FluentBy.ByLast |
last()
|
static org.seleniumhq.selenium.fluent.FluentBy.ByLast |
last(org.openqa.selenium.By by)
|
static FluentBy.ByAttribute |
notAttribute(String name)
Finds elements by an named attribute not being present in the element, irrespective of element name. |
static org.seleniumhq.selenium.fluent.FluentBy.ByStrictClassName |
strictClassName(String className)
Finds elements based on the value of the "class" attribute. |
| Methods inherited from class org.openqa.selenium.By |
|---|
className, cssSelector, equals, findElement, findElements, hashCode, id, linkText, name, partialLinkText, tagName, toString, xpath |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FluentBy()
| Method Detail |
|---|
public void beforeFindElement(org.openqa.selenium.WebDriver driver)
public static org.seleniumhq.selenium.fluent.FluentBy.ByStrictClassName strictClassName(String className)
className - The value of the "class" attribute to search for
public static FluentBy.ByAttribute attribute(String name)
public static FluentBy.ByAttribute attribute(String name,
String value)
public static FluentBy.ByAttribute notAttribute(String name)
public static org.seleniumhq.selenium.fluent.FluentBy.ByComposite composite(org.openqa.selenium.By.ByTagName b0,
org.openqa.selenium.By.ByClassName b1)
public static org.seleniumhq.selenium.fluent.FluentBy.ByComposite composite(org.openqa.selenium.By.ByTagName b0,
FluentBy.ByAttribute b1)
public static org.seleniumhq.selenium.fluent.FluentBy.ByLast last(org.openqa.selenium.By by)
public static org.seleniumhq.selenium.fluent.FluentBy.ByLast last()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||