public static class ChoicePickerHelper.ByVisibleTextChoicePicker extends Object implements ChoicePicker, MultipleChoicePicker
Modifier and Type | Method and Description |
---|---|
ChoicePickerHelper.ByVisibleTextChoicePicker |
addFilter(com.google.common.base.Predicate<org.openqa.selenium.WebElement> filter) |
ChoicePickerHelper.ByVisibleTextChoicePicker |
allRulesMustPass(boolean allRulesMustPass)
If true, then all rules/filters must pass to pick an element.
|
ChoicePickerHelper.ByVisibleTextChoicePicker |
contains(String str) |
ChoicePickerHelper.ByVisibleTextChoicePicker |
endsWith(String str) |
ChoicePickerHelper.ByVisibleTextChoicePicker |
match(String str) |
org.openqa.selenium.WebElement |
pick(List<org.openqa.selenium.WebElement> options)
Picks the first WebElement from the @options, that meets all requirements depending on implementation.
|
List<org.openqa.selenium.WebElement> |
pickMultiple(List<org.openqa.selenium.WebElement> options)
Picks multiple WebElements from the @options, that meets all requirements depending on implementation.
|
void |
setTransformationFunction(com.google.common.base.Function<org.openqa.selenium.WebElement,org.openqa.selenium.WebElement> transformationFunction)
Sets a transformation function, that will be used to transform each WebElement from list of possible choices
to another WebElement.
|
ChoicePickerHelper.ByVisibleTextChoicePicker |
startsWith(String str) |
String |
toString() |
public ChoicePickerHelper.ByVisibleTextChoicePicker addFilter(com.google.common.base.Predicate<org.openqa.selenium.WebElement> filter)
public ChoicePickerHelper.ByVisibleTextChoicePicker allRulesMustPass(boolean allRulesMustPass)
allRulesMustPass
- public ChoicePickerHelper.ByVisibleTextChoicePicker contains(String str)
public ChoicePickerHelper.ByVisibleTextChoicePicker endsWith(String str)
public ChoicePickerHelper.ByVisibleTextChoicePicker match(String str)
public org.openqa.selenium.WebElement pick(List<org.openqa.selenium.WebElement> options)
ChoicePicker
pick
in interface ChoicePicker
options
- options to be picked from.public List<org.openqa.selenium.WebElement> pickMultiple(List<org.openqa.selenium.WebElement> options)
MultipleChoicePicker
pickMultiple
in interface MultipleChoicePicker
options
- options to be picked frompublic void setTransformationFunction(com.google.common.base.Function<org.openqa.selenium.WebElement,org.openqa.selenium.WebElement> transformationFunction)
text1
text2
,
but you want to compare the text only with the second span.
The only thing you need to do is to add this function:
new Function() {
transformationFunction
- public ChoicePickerHelper.ByVisibleTextChoicePicker startsWith(String str)
Copyright © 2015 JBoss by Red Hat. All Rights Reserved.