How to proceed with another command if error occurs before?

Hi there,

if the macro encounters an
[error] timeout reached when looking for element
I want to proceed with another command that will come later in the macro.

How can I do this?

{
  "Command": "open",
  "Target": "https://www.website-1.com",
  "Value": ""
},
{
  "Command": "type",
  "Target": "id=plugins-select-all",		<--- IF THIS FAILS
  "Value": "on"
},
{
  "Command": "click",
  "Target": "id=plugins-select-all",
  "Value": ""
},
{
  "Command": "click",
  "Target": "id=upgrade-plugins",
  "Value": ""
},
{
  "Command": "selectWindow",			<--- I WANT TO PROCEED HERE
  "Target": "tab=open",
  "Value": "https://www.website-2.com"
},

I

Thanks in advice!

https://a9t9.com/kantu/docs/selenium-ide#lastcommandok

1 Like

Thank you! Working like a charm. :slight_smile: