Silk Mobile

Table of Contents (Homepage)

ElementSendText

ElementSendText(Zone, Element, Index, Text)

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

images/images/os-icons/os_windows_150x150.png

images/images/os-icons/os_blackberry_150x150.png

Description

Send text to an element

Parameters

  • Zone: Select Zone

  • Element: Select Element

  • Index: Element index

  • Text: Text to Send

Usage

Scenario: In the following example we will fill the "Search" field with some value by using the field native ID.

  1. First, lets identify the field's native ID by using the spy feature.
    images/download/attachments/2688874/1.jpg

  2. We will use the "ElementSendText" command, and send the value ‘Shoes’.

    images/download/attachments/2688874/2.jpg

Command usage:

With the 'ElementSendText' command you can send text from your computer's keyboard to a specific text field, without clicking on it.

Parameters:

  • Zone: Select Zone – will be set to "Native"

  • Element: Select Element – will be set to "id=search_src_text"

  • Index: Element index – will be set to "0"

  • Text: Text to Send – will be set to "Shoes"

Code Examples

Java Example
client.elementSendText("NATIVE", "id=search_src_text", 0, "shoes");
C# Example
client.ElementSendText("NATIVE", "id=search_src_text", 0, "shoes");
VBScript Example
client.ElementSendText "NATIVE", "id=search_src_text", 0, "shoes"Report
Python Example
self.client.elementSendText("NATIVE", "id=search_src_text", 0, "shoes")
Perl Example
$client->elementSendText("NATIVE", "id=search_src_text", 0, "shoes");
VUGen Example
ic_element_send_text(&client, "NATIVE", "id=search_src_text", 0, "shoes");