The 'Wait for element' activity takes a lot of time to find a specific element in a Windows program

I have a problem where a specific element is already loaded, and the ‘Wait for element’ activity takes 20 seconds to find it. I use this activity 5 times in my workflow, which adds a waiting time of 100 seconds, more than a minute! The program is supposed to be done in 30 seconds. I’ve tried using the ‘Wait for image’ activity which is 10 times more faster, but there is a problem, if the program is made on a specific PC with a specific resolution and scale, the program will not work in other PC’s. I need something flexible that would work in any screen ecosystem. Is there any way to make the ‘Wait for element’ activity faster, or a logical alternative that works the same?

1 Like

You can use the same activity multiple time and make it work in finding the element.
1- You can join the same activity from its error port to start port. In this case bot will click on the element and fails to find the element, throws error (error port is connected to start port, find for the element again. It will work in loop and wait until it finds the element. Once the element appears bot will click on that element and move on.

2- Use the same element with normal selection with studio pro give wait of 5 sec, then connect it with the same element but use it wit XPath give wait for 5 sec and then lastly connect it with the same element but use it with CSS selection.

These are effective ways in order to avoid ‘wait for element’ activity.

I hope it solves your query. Have a wonderful day :slight_smile:

1 Like