I am trying to add a ‘class’ attribute for the UiElements of output from Find Children activity (selector for each of those output elements from the activity doesn’t include the class attribute), but haven’t been successful in doing so. Just wondering if it is possible to add it during a run time under for each loop as in below screenshot with an assign activity to update the selector. Any suggestion would be helpful.
Thanks @vvaidya . Looks like the ‘Invoke Method’ won’t work in my case.
Putting it in another way, so this is what i have been trying to do.
Using ‘Find Children’ Activity to retrieve all the button elements inside a section.
Using ‘For Each’ Activity to loop through all the elements found and perform
a. ‘Click’ Activity on the button. (As soon as this is clicked, the class of the activity changes from ‘btn btn-default’ to ‘btn btn-success’ in couple of second)
b. ‘Wait Attribute’ Activity to wait until the ‘class’ changes to ‘btn btn-success’.
However here is the problem, ‘Wait Attribute’ never receives the updated ‘class’ attribute. Its always ‘btn btn-default’ due to which the for each loop never continues. Looks like the ‘Find Children’ activity stores all the details related to its children elements during its initialization itself instead of accessing on run time when that particular element is accessed.
Workflow Screenshot:
In the initial case for 2.b i wanted to use ‘Wait Element Vanish’ activity to continue the loop when that element no longer exists. But in that case since ‘class’ attribute was not identified as one of the selectors for ‘item’, i was trying to add it during run time.