Edit-text get (FR)
Perfecto Command
mobile:edit-text:get
Purpose
Identifies an edit field, based on a text label, and retrieves its value. The value is returned as a string.
Parameters
Name | Type | Possible Values | Description |
---|---|---|---|
label (Mandatory) | String |
|
The text that appears on, or related to, the edit field.
It is recommended to use the entire string searched for, to ensure that if the OCR misses a few characters, the label will still be found. |
lines | Int |
|
The number of text lines to be retrieved from the edit field. |
In addition, the General Visual Analysis common and text parameters are supported.
Return Value
String containing the lines of text returned from the Text field.
Exceptions
None
Examples
Copy
Java sample
Map<String, Object> params = new HashMap<>();
params.put("label", "Visual");
params.put("threshold", 80);
params.put("lines", 10);
String textVal = (String) driver.executeScript("mobile:edit-text:get", params);
Copy
C# sample
Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("label", "Visual");
pars.Add("threshold", 80);
pars.Add("lines", 10);
driver.ExecuteScript("mobile:edit-text:get", pars);