Setting value (ZD)
Please read the Terms of Use for Materials on ZennoLab
Table of contents
Description
The Set Value action is used to set values for input fields
How to add an action to the project?
Through the context menu, add Action → Android → Set value
Through the action designer.
Or use smart search.
How to choose a field to set the value?
In the emulator window, by clicking the right mouse button on the item to which we want to set the value. From the context menu, select "To the action designer" (1), the constructor will be loaded at the bottom of the emulator window, select the type of action "Set" (2), set the value (3) and click the "Add to project" button (4).
Setup Action: Tab "Main"
What
The text you want to insert. You can use both simple text and variable macros {-Variable.someVar-}, {-Profile.Name-}.
Classic item search
Please read the Terms of Use for Materials on ZennoLab
Before you interact with the element it must be found.
The search is carried out by attributes of the element.
Conditions
Group - is the priority of this condition. The higher this number is the priority lower. If it was not possible to find an element by condition with the highest priority, then we move to the condition with the next priority and so while the element is not found, or the search conditions will not end. You can add several conditions with one priority, then the search will be made on all conditions with the same priority simultaneously.
Attribute - an attribute of an element for which is searched.
Search type:
a) text - search for full or partial text entry;b) notext - search for items in which there will be no specified text;
c) regexp - search using a Regexp tester;
Value - attribute value.
Match # - the sequence number of the found item (numbering from scratch!).
Delete condition
To delete the search condition, you must click on the left mouse button on the left side of condition (on the screenshot above is highlighted in blue) and click the Delete button on the keyboard.
Multiple сondition
To search the item, several conditions can be used simultaneously.
It is always important to try to select the conditions in such a way that only one element remained as a result of the search.
Setup Action: More Tab
Wait before execution (sec.)
How many seconds will expect before execution (Random value in the range between from and to).
Wait no longer than (sec.)
If after the specified time the element does not appear, the action will complete the work with an error.
Usage example
By default, on the main screen of the emulator there is an input line for searching on Google Play, let's try to enter some text into it.
First, right-click on the field and send it to the Action designer.
Next, we check that the element can be found according to the specified search criteria (1), after which you need to enter the required text in the “Value” field (2) and click “Test” (3), to make sure everything is working correctly. And if everything is successful, then you can click "Add to project" (4).
The action is added and ready to work.