Okay so I am following one of the tutorials on UIPath Academy involving Selectors and the Property Explorer panel in UI Explorer. In this activity, the instructor uses a wait attribute activity so that a change in the attributes of an already found UI element is accounted for and then highlighted.
The button in question is a button on http://rpachallenge.com/ and what I want to do is highlight the button after it is clicked. When the button is clicked, the innerText attribute will change to “Round 1” and that is what my highlight activity is predicated on. Once that attribute changes, it should highlight and end the automation.
What I am doing:
I am using the find element to find the button on the page. Once the automation finds the button and stores it in a UIElement variable named “button”, the write log message displays “Waiting for button press” in the output panel. After that, wait attribute should wait for 10 seconds (10000 milliseconds) until the button is pressed at which point if it does not find the element it throws an exception. If the attribute changes to the desired attributeValue then the wait attribute activity should trigger and then the highlight activity should highlight the button.
When I run the automation, the button is found and placed into the variable I mentioned above and the write log activity is prompted. The problem occurs when the wait attribute activity starts. Even after I click the button and the innerText is set to “Round 1” it never triggers the wait attribute activity and the exception is thrown: “Wait Attribute: Activity timeout exceeded.”
The UiElement button variable I mentioned earlier is never mutated after the value is given by the Find element activity and therefore the attribute never changes. But this seems kind of counter-intuitive considering developers want UIElements to change their attributes according the UIElement in the application we are automating. So if there is a way around this I would like to know one.
Here are some images to better illustrate:
If you need more information please let me know. Thank you!