public abstract class ByJquery
extends org.openqa.selenium.By
ByJquery.$("div.className li");
ByJQuery.$("('div.className li a').parent('div')"); It accepts simple searches like the
first example that don't need to be wrapped in brackets, but if you want to call another jQuery
method like .parent the first selector needs to be wrapped in brakcets.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| Modifier and Type | Method and Description |
|---|---|
static ByJquery |
$(String selector) |
static ByJquery |
$(org.openqa.selenium.WebElement element) |
ByJquery |
children() |
ByJquery |
children(String selector) |
ByJquery |
closest(String selector) |
boolean |
equals(Object o) |
ByJquery |
filter(String selector)
This allows filtering results based on a selector or a function.
|
ByJquery |
find(String selector) |
org.openqa.selenium.WebElement |
findElement(org.openqa.selenium.SearchContext context)
Find a single element.
|
int |
hashCode() |
ByJquery |
parent() |
ByJquery |
parent(String selector) |
ByJquery |
parents() |
ByJquery |
parents(String selector) |
ByJquery |
prev() |
ByJquery |
prev(String selector) |
ByJquery |
siblings() |
ByJquery |
siblings(String selector) |
public static ByJquery $(org.openqa.selenium.WebElement element)
public ByJquery parent()
public ByJquery parents()
public ByJquery siblings()
public ByJquery children()
public ByJquery prev()
public ByJquery filter(String selector)
selector - can represent a selector expression or a functionpublic org.openqa.selenium.WebElement findElement(org.openqa.selenium.SearchContext context)
findElement in class org.openqa.selenium.Bycontext - A context to use to find the elementpublic boolean equals(Object o)
equals in class org.openqa.selenium.Bypublic int hashCode()
hashCode in class org.openqa.selenium.ByCopyright © 2015 Atlassian. All rights reserved.