Edit-image set (FR)

Perfecto Command

mobile:edit-image:set

Purpose

Identifies an edit field, based on an image label, and inserts the specified text in the value parameter into the field. The field is in relation to the found label and is defined by the label position and offset parameters.

Parameters

Name Type Possible Values Description
label (Mandatory) Multimedia

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

Image should be in JPEG, PNG or BMP format.

text (Mandatory) String

String - The text to insert in the edit field.
Secured String - The encoded text to insert in the edit field.

The text can be in any language.
caps String Aa | A | a

The current capitalization state of typing. Only relevant if the current position is not the first character. Required for devices that support simulated text entry.

Aa - automatically capitalize first character

A - UPPERCASE lettering

a - lowercase lettering

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

Return Value

None

Exceptions

None

Examples

Copy

Java sample

Map<String, Object> params = new HashMap<>();
params.put("label", "PRIVATE:/images/flight.png");
params.put("text", "United");
params.put("label.direction", "below");
params.put("label.offset", "7%");
driver.executeScript("mobile:edit-image:set",params);
Copy

JavaScript sample

var params = {
    "label":"STRING",
    "threshold":80,
    "operation":"single"    }
    browser.executeScript('mobile:button-text:click', params);
Copy

C# sample

Dictionary<String, Object> pars = new Dictionary<String, Object>();
pars.Add("label", "PRIVATE:/images/flight.png");
pars.Add("text", "Alitalia");
pars.Add("label.direction", "below");
pars.Add("label.offset", "7%");
driver.ExecuteScript("mobile:edit-image:set",pars);