Question

Capture - Object not present anymore on the screen

  • 24 November 2023
  • 1 reply
  • 65 views

Badge +4

Hi all, 

Please see alto attachemnt but the need would be the following:

  • I have a use-case when I need to press a button, and this button sometime exists and sometimes will not exists (dependnig on certain conditions)
  • The problem is that the button will hide automaticall when certain conditions will happen, thus using an if statement to check if the object is present works perfectly in 95% of the cases. 
  • The bot will fail if e.g. the button will dissaper just after the if statement passed and the bot is calling the “Capture” command.

Basically if the button is hidded in between “if” and “Capture command” my bot will fail/crash. 

 

Any advice?
Many Thanks.


1 reply

Userlevel 3
Badge +7

Hi @RenderMan,

You can place that “capture/recorder” command under a “Try” command and “Catch” can have a log to file or something which will tell you the button was not there at that time. By putting this for sure the click will happen if the button exists if not then it continues with rest of your flow.

 

Hope this helps!

Reply