GDSL 'click' commands do not always click on the expected element and the script continues

Sometimes, GDSL 'click' commands do not click on the expected element. However, if the script continues, it means that the element has been found. Consequently, it is possible to make a second click if the first one did not work.

 

Here is an example of a script where the click on the expected element does not always work:

waitUntilIdBeforeClick,android:id/button1 pause,500

 

To make a second click on the element if the first one did not work, you can use:

waitUntilIdBeforeClick,android:id/button1 pause,500 if,exists,id,android:id/button1 clickById,android:id/button1 fi