public class Selectors
extends java.lang.Object
| Constructor and Description |
|---|
Selectors() |
| Modifier and Type | Method and Description |
|---|---|
static org.openqa.selenium.By |
by(java.lang.String attributeName,
java.lang.String attributeValue)
Synonym for #byAttribute
|
static org.openqa.selenium.By |
byAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Find elements having attribute with given value.
|
static org.openqa.selenium.By |
byText(java.lang.String elementText)
Find element HAVING given text (exactly this text)
|
static org.openqa.selenium.By |
byTitle(java.lang.String title)
Find element with given title ("title" attribute)
|
static org.openqa.selenium.By |
withText(java.lang.String elementText)
Find element CONTAINING given text (as a substring)
|
public static org.openqa.selenium.By withText(java.lang.String elementText)
elementText - Text to search inside elementpublic static org.openqa.selenium.By byText(java.lang.String elementText)
elementText - Text that searched element should havepublic static org.openqa.selenium.By byAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
attributeName - name of attribute, should not be empty or nullattributeValue - value of attribute, should not contain both apostrophes and quotespublic static org.openqa.selenium.By by(java.lang.String attributeName,
java.lang.String attributeValue)
public static org.openqa.selenium.By byTitle(java.lang.String title)