On Element Appear - problems

Hello guys,
I’m having some difficulties to find the best activity to automate a task which needs to wait until an element appear/change in a web application, the waiting time may vary; so, searching on the Internet, I found this activity “On Element Appear” which looks that can solve my problem, but it does not work as intended.

This is specifically what I want to do:
1- Click the start button → Done with automation.
2- The start button will start a task, when pressed it will shows a progress bar and a button which you can abort the task. → The automation process will need to wait until the task finished; in this case, I notice that when task finish the button “abort task” change to “reset task”, so I tried to look for the “reset task” button to appear.
3- When the “reset task” button appears, it needs to click that button.

I tried the different combinations settings on the “On Element Appear” activity, but still none of them worked.

Please see images below:

Task running:

Task finished:

Settings 1:
This setting does not work; due to does not wait for the “reset task” to appears, it moves to the next activity which is a click, obviously it fails because of the click timeout and it can not find the “reset task” button.

Setting 2:
This setting successfully waits, it looks like finds the “reset task” button when appears because it marks the button in a red square, but it never moves to the click activity.

  • On settings, I changed: RepeatForever: False, WaitActive: True and WaitVisible: True

Hope you guys can help me with this, or if you guys knows a better way to do this.

NOTE: I also tried the “Check App State” activity, but it looks like you have to provide an specific time to wait until do something, but what happen if the waiting time vary? I don’t want to wait all that time until it does something.

Best regards,

Mario

1 Like

Hi @mariozelaya23 ,

Can you please check with this property
Target.WaitForReady - Before performing the actions, wait for the target to become ready. The following options are available:

  • None - Does not wait for anything except the target UI element to exist before executing the action. For example, you can use this option if you want to retrieve just text from a web page or click a particular button, without having to wait for all UI elements to load. Note that this may have unwanted consequences if the button relies on elements which are not yet loaded, such as scripts.

  • Interactive/Complete - Waits all of the UI elements in the target app to exist before actually executing the action.

To assess if an application is in the Interactive or Complete state, the following tags are verified:

Hi @mariozelaya23

Try as below:

Take 1 flowchart

Start
Click start button
Elements exsist - pass reset button selector here
Condition - reset button exsist
True - then (do nothing here, it will execute next workflow)
Flase - link this to element exsist.

This flowchart will continuously monitor for reset button, till it appears on the screen.

Thanks

Hi @mariozelaya23

You can use Check App state activity here

Activities - Check App State (uipath.com)

13. How to use Check App State Activity in UiPath | UI Synchronization Activities | Modern Design (youtube.com)