Could you please add the try/except continue key words?

could you please add the “try/except” “continue” key words?

Explain your request better

Try-catch usually is:

try
  command
  command
  command
catch
  command you want to run if there is an error
end

I agree that this would be nice to have, but no Selenium IDE flavor has this yet. But with the UI.Vision RPA Selenium IDE, try/catch can be already be “simulated” with the two existing constructs:

  1. Internal variables: !errorignore and !statusOK
  2. OR: OnError command

The difference is that with the !statusOK solution all 3 “command” are executed, but with the OnError solution it “jumps” to the label on error => exactly as try/catch.
I usually use !statusOK more often, but that might be just because I am more used to it :wink:

Option 1: Use !statusOK

  • store | true | !errorignore (do not stop macro on error)
  • command
  • command
  • command
  • If ${!statusOK} == true
  • command you want to run if there is an error
  • end
  • store | false | !errorignore (back to normal mode)

Option 2: Use OnError

  • OnError | #goto | mycatch
  • command
  • command
  • command
  • GotoLabel | all_ok
  • Label | mycatch
  • command you want to run if there is an error
  • Label | all_ok
  • …continue rest of macro here—

Screenshots:
!statusOK demo:

OnError demo:

1 Like

thank you for your warmly answer!