Get selector of CurrentLabel in "For each UI element"

Hi, is there an option to get selector of label in “For each UI element” activity?
I like to pass this selector to the click activity inside loop.

@Tomasz_Heliasinski

the label belongs to current element itself

so if you do currentElement. in your loop it should show the properties to get selector as well

cheers

@Tomasz_Heliasinski,

You can pass the currentUiElement in the for each UI element activity to click activity’s input element property.

You can get the selector as well if the currentUiElement using Selector property like this

currentUiElement.Selector

You dont need to pass the selector, infact thats rather inefficient as the click will need to search for the element again based on the selector. The click activity (and all the Ui activities) contain properties for ‘Input Element’ and ‘Output element’.

You can use this to both store an element you have used in an activity to a variable, so you can work with it later, aswell as provide an element you already found.

In the for each element loop, you can pass the currentUiElement directly to the click action using this property.

2 Likes