org.richfaces.fragment.common.picker

## Class ChoicePickerHelper.ByVisibleTextChoicePicker

- java.lang.Object
- - org.richfaces.fragment.common.picker.ChoicePickerHelper.ByVisibleTextChoicePicker

- All Implemented Interfaces:
    ChoicePicker, MultipleChoicePicker
  Enclosing class:
    ChoicePickerHelper

      public static class ChoicePickerHelper.ByVisibleTextChoicePicker
      extends Object
      implements ChoicePicker, MultipleChoicePicker

- - ### Method Summary

    Methods
    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()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### addFilter

          public ChoicePickerHelper.ByVisibleTextChoicePicker addFilter(com.google.common.base.Predicate<org.openqa.selenium.WebElement> filter)

    - #### allRulesMustPass

          public ChoicePickerHelper.ByVisibleTextChoicePicker allRulesMustPass(boolean allRulesMustPass)

      If true, then all rules/filters must pass to pick an element. If false, then if at least one rule/filter passes, element will be picked. Default value is true.
      Parameters:
        `allRulesMustPass` -

    - #### contains

          public ChoicePickerHelper.ByVisibleTextChoicePicker contains(String str)

    - #### endsWith

          public ChoicePickerHelper.ByVisibleTextChoicePicker endsWith(String str)

    - #### match

          public ChoicePickerHelper.ByVisibleTextChoicePicker match(String str)

    - #### pick

          public org.openqa.selenium.WebElement pick(List<org.openqa.selenium.WebElement> options)

      Description copied from interface: `ChoicePicker`
      Picks the first WebElement from the @options, that meets all requirements depending on implementation.
      Specified by:
        `pick` in interface `ChoicePicker`
      Parameters:
        `options` - options to be picked from.
      Returns:
        null or WebElement that meets all requirements.

    - #### pickMultiple

          public List<org.openqa.selenium.WebElement> pickMultiple(List<org.openqa.selenium.WebElement> options)

      Description copied from interface: `MultipleChoicePicker`
      Picks multiple WebElements from the @options, that meets all requirements depending on implementation.
      Specified by:
        `pickMultiple` in interface `MultipleChoicePicker`
      Parameters:
        `options` - options to be picked from
      Returns:
        List of WebElement that meets all requirements or an empty list

    - #### setTransformationFunction

          public 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. Example: This picker will be picking and comparing text from such divs: `
      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() {`
      Parameters:
        `transformationFunction` -

    - #### startsWith

          public ChoicePickerHelper.ByVisibleTextChoicePicker startsWith(String str)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.