Silk Mobile

Table of Contents (Homepage)

HybridSelect

HybridSelect(WebViewLocator, Index, Method, Value, Select)

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

Select an option from a Select element in a WebView.

Parameters

  • WebViewLocator: The web view element (optional)
    string like id=web or empty for the first WebView in the page if you have more than one web view there.

  • Index: WebView index

  • Method: Property of the Select element (css/id/text/Name/xpath)

  • Value: Query to identify the Select element .

  • Select: Value to select from the list .

Usage

Scenario : In the following example, we will select a value from a web drop down list element, and change the language in the Wikipedia home page.

images/download/attachments/3310085/1.jpg

Command usage: In order to select an item from a drop-down list that is a web object - use the HybridSelect command.

images/download/attachments/3310085/2.jpg

Parameters:

  • WebViewLocator: will be Empty

  • Index: Will be 0

  • Method: Will be set to id

  • Value: Will be set to searchLanguage

  • Select: Will be set to Deutsche

Result: Value was change to Deutsche

Code Examples

Java Example
client.hybridSelect("", 0, "name", "hl", "Deutsch");
C# Example
client.hybridSelect("", 0, "name", "hl", "Deutsch");
VBScript Example
client.hybridSelect "", 0, "name", "hl", "Deutsch"
Report
Python Example
self.client.hybridSelect("", 0, "name", "hl", "Deutsch")
Perl Example
$client->hybridSelect("", 0, "name", "hl", "Deutsch");