This activity lets you change the value attribute of the selected interface element.
A simple example of its usage is selecting the input field in Notepad and writing some text to it by changing the value of this element. It can be used for changing values of many other interface elements such as path to file fields and others.
To be able to click an element of an app, we must start from defining the app element to use. This is handled by Desktop Picker.
To pick the desired element, open the dropdown menu in the Interface element parameter and then click the ‘Pick New Element’ button.
Here you can select an element or pick a new one
This will launch Desktop Picker. Open the desired app, hover your cursor over the required element (for example, text input field in Notepad). It will be highlighted red. Then press Ctrl + X to pick this element.
As soon as the element is picked, this window will appear. It indicates that the element was found and recognized. You can also set the element name here. It will be displayed in Studio Pro.
Advanced options menu displays the structure, or the selector of the indicated element. It usually consists of multiple tabs and each tab has its own attributes and values which represent the hierarchy of how the interface element is developed. You can modif, check or uncheck the attributes to achieve better accuracy or stability of interaction with the element.
Advanced options menu
The ‘Test’ button lets you check if the element was defined correctly. Upon clicking it, focus will be shifted to the browser window and the picked element will be highlighted yellow if it was recognized correctly. It can display one of the following messages:
- Found 1 element means that the specific element was successfully recognized.
- Found >1 element means that there are a few similar elements. In this case it is required to pick one of them or double check the advanced options.
- Not found means that the element was not recognized and must be redefined or the advanced options must be corrected.
The ‘Replace element’ button lets you pick another element.
Click ‘Save’ once you are ready. This element will be saved for further usage in Studio Pro activities.
Once the setup is done, you should see this in the Interface element parameter. There is a preview image of the picked element.
Preview of the selected element
Alternatively, the Use focused element checkbox lets you use the element in your currently opened app. For example, you have opened one more Notepad file and you are currently editing it (this means that your cursor is placed somewhere in its text input field). In this case you may skip choosing the specific element as described above. Your text will be typed into the focused app.
It is also possible to edit an existing element that you have previously picked. To do this, click the ‘Edit element’ button below its name.
Here you can edit the element or pick a new one
This is what you will see. Here you can change its name or replace the element completely by picking a new one.
Element properties and the button that lets you replace it
If you choose to replace the element by clicking the ‘Change the element button’, Picker will be activated again. Once you pick the new element, this window will appear. It shows the old and new versions and lets you either save it and overwrite the old element or cancel the replacement.
Here you can choose the new element version
An important note about elements names: when working with text editors such as Notepad or others, the file name is usually changed after the file was modified. Often an asterisk symbol (*) is added to its name. For example, if the file name is new1.txt, then after modifying it will become *new1.txt. Pay attention to this and make sure to choose the proper selector attributes.
Interface element parameter defines the element which value will be changed, and Value parameter defines how it will be changed. Much like in a lot of other activities, it is possible to input the value manually by selecting Set a value option, set the value dynamically using Calculate a value option and use the result of the previous activity by selecting Save the previous step result.
Wait before, sec and Wait after, sec parameters indicate how much time will pass before or after executing this activity.
Wait before, sec and Wait after, sec parameters