Skip to main content

SeeTestAutomation- GetPickerValues

info

Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .

GetPickerValues(Zone, PickerElement, Index, WheelIndex)

info

This is supported in iOS only.

Description

Get all values from picker element. 

Parameters

Zone - Select Zone.
PickerElement - Select the picker Element.
Index - Element index.
WheelIndex - Wheel index. 

Usage

Scenario: We want to verify that some picker element contains all the values that its should.

  1. First we will identify the picker element using the object spy, the picker element needs to contain the word "Picker" in the 'class' property (can be found also it the 'knownSuperClass' property).
    In our example the value is "UIAPicker". 

  2. Now we need to select the wheel index (begins at 0), in our example we have 2 wheels: the first wheel contains a list of  names and the second wheel contains a list of numbers.
    we will choose the first wheel, therefore the 'WheelIndex' parameter is 0.

  3.  Now we will execute the command, the result is a string array which contains all the names in the picker from the first wheel.
    Result = John Appleseed; Chris Armstrong; Serena Auroux; Susan Bean; Luis Becerra; Kate Bell; Alain Briere.

Code Examples

Java Example

String[] strArray0 = client.getPickerValues("NATIVE", "xpath=//*[@class='UIAPicker']", 0, 0);