Skip to main content

SeeTestAutomation - ElementSendText

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 .

ElementSendText**(**Zone, Element, Index, Text)

Description

Send text to an element

Parameters

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.

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

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"

Property:

info

This properties are supported in iOS only.

ios.elementsendtext.action.fire: possible values - true/ false (Default mode is false)
Function: When the user uses the SeeTestAutomation - ElementSendText command and the ios.elementsendtext.action.fire property is enabled, it will trigger the event that should have been triggered by the keyboard.
To set this property see: SetProperty  

You can use this property by default for all your tests by adding "ios.elementsendtext.action.fire=true" to the app.properties file.

Code Examples

Java Example

client.elementSendText("NATIVE", "id=search_src_text", 0, "shoes");

C# Example Expand source

client.ElementSendText("NATIVE", "id=search_src_text", 0, "shoes");

VBScript Example Expand source

client.ElementSendText "NATIVE", "id=search_src_text", 0, "shoes"Report 

Python Example Expand source

self.client.elementSendText("NATIVE", "id=search_src_text", 0, "shoes")

Perl Example Expand source

$client->elementSendText("NATIVE", "id=search_src_text", 0, "shoes");

VUGen Example Expand source

ic_element_send_text(&client, "NATIVE", "id=search_src_text", 0, "shoes");