Edit-image get (FR)

Perfecto Command

mobile:edit-image:get

Purpose

Identifies an edit field, based on an image label, and retrieves its text value. The value is returned as a string.

Parameters

Name Type Possible Values Description
label (Mandatory) String

The image that appears on, or related to, the edit field.

Image should be in JPEG, PNG or BMP format.

lines Int
The number of text lines to be retrieved from the edit field.

In addition, the General Visual Analysis common and image parameters are supported.

Return Value

String containing the lines of text returned from the field.

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> params = new HashMap<>();
params.put("label", "PUBLIC:Expense_password_field.png");
params.put("threshold", 95);
params.put("match", "Bounded");
params.put("label.direction", "above");
params.put("lines", 10);
imageVal = (String) driver.executeScript("mobile:edit-image:get", params);
Copy

C# sample

Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("label", "PUBLIC:Expense_password_field.png");
pars.Add("threshold", 95);
pars.Add("match", "Bounded");
pars.Add("label.direction", "above");
pars.Add("lines", 10);
driver.ExecuteScript("mobile:edit-image:get", pars);