Silk Mobile

Table of Contents (Homepage)

ElementListVisible

Note: Command will work only after application preparation .

boolean elementListVisible (ListLocator, ElementLocator, Index)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

Description

Matching command to elementListSelect . Will make element on a list visible

Parameters

  • ListLocator: List locator

  • ElementLocator: Element locator

    Note: This variable does not support XPath queries

  • Index: Element index

Usage

Command Usage: This is actually elementListSelect command with click parameter of false.

Scenario: In the following example we will use the EriBank application to select an element from the country list.

Step 1: Login to the EriBank application.

Step 2: Click the Make Payment button.

Step 3: Click Select button.

Step 4: See elementListSelect example on how to get the list locator Native properties and the element locator Native properties (The option you want to pick on the list).

In this example we would want to make the United Kingdom option

images/download/attachments/2689470/12.jpg

Step 5: Set the commands properties to find the element

  1. List Locator: "id=countryList"

  2. Element Locator: "text=United Kingdom"

  3. Index: 0

This will now find 'United Kingdom' and make it visible on the screen.

images/download/attachments/2689470/13.jpg

Console log:

images/download/attachments/2689470/14.jpg

Code Examples

Java Example
client.elementListVisible("id=countryList", "text=United Kingdom", 0);
C# Example
client.ElementListVisible("id=countryList", "text=United Kingdom", 0);
VBScript Example
client.ElementListVisible ( "id=countryList", "text=United Kingdom", 0 )
Python Example
self.client.elementListVisible("id=countryList", "text=United Kingdom", 0)
Perl Example
$client->elementListVisible("id=countryList", "text=United Kingdom", 0);