|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.team.fvt.tests.utils.ByUtils
public class ByUtils
Utility class to create By
locator mechanism.
Field Summary | |
---|---|
static int |
CONTAINS_PATTERN
|
static int |
ENDS_WITH_PATTERN
|
static int |
EQUALS_PATTERN
Comparison pattern value. |
static int |
STARTS_WITH_PATTERN
|
Constructor Summary | |
---|---|
ByUtils()
|
Method Summary | |
---|---|
static java.lang.String |
xpathCompareWithText(int pattern,
java.lang.String text,
boolean item)
Add to the given xpath builder a comparison to the given text following the given pattern. |
static org.openqa.selenium.By |
xpathMatchingItemText(java.lang.String xpathPrefix,
int pattern,
java.lang.String text)
Return a xpath to match the given text using the given pattern. |
static org.openqa.selenium.By |
xpathMatchingItemText(java.lang.String xpathPrefix,
java.lang.String text)
Return a xpath to match the given text using the given pattern. |
static org.openqa.selenium.By |
xpathMatchingText(int pattern,
java.lang.String text)
Return a xpath to match the given text using the given pattern. |
static org.openqa.selenium.By |
xpathMatchingTexts(int pattern,
boolean all,
java.lang.String... texts)
Return a xpath to match the given texts using the given pattern. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int EQUALS_PATTERN
The patterns are bitwise, hence they can be combined. In that case, an OR applies with all the specified patterns.
For example, if you wan to compare either equals or starts-with, then use:
EQUALS_PATTERN
| STARTS_WITH_PATTERN
public static final int STARTS_WITH_PATTERN
public static final int ENDS_WITH_PATTERN
public static final int CONTAINS_PATTERN
Constructor Detail |
---|
public ByUtils()
Method Detail |
---|
public static java.lang.String xpathCompareWithText(int pattern, java.lang.String text, boolean item)
pattern
- The pattern used for matching text. Currently supported are:
WARNING: These bits cannot be combined for this method.text
- The text to compare withitem
- Tells whether the text comparison concerns item or notpublic static org.openqa.selenium.By xpathMatchingItemText(java.lang.String xpathPrefix, int pattern, java.lang.String text)
pattern
- The pattern used for matching text. Currently supported are:
WARNING: These bits cannot be combined for this method.text
- The text to match
By
.public static org.openqa.selenium.By xpathMatchingItemText(java.lang.String xpathPrefix, java.lang.String text)
text
- The text to match
By
.public static org.openqa.selenium.By xpathMatchingText(int pattern, java.lang.String text)
pattern
- The pattern used for matching text. Currently supported are:
WARNING: These bits cannot be combined for this method.text
- The text to match
By
.public static org.openqa.selenium.By xpathMatchingTexts(int pattern, boolean all, java.lang.String... texts)
Note that if there are several texts provided, one can specify whether all of them must match or only one is enough.
pattern
- The pattern used for matching text. Currently supported are:
WARNING: These bits cannot be combined for this method.all
- Tells whether all texts must match or only one is enough. Ignored
if only one text is given.texts
- The list of texts to match
By
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |