How to export log file if error occurs

Hi. I’m trying to get log file if the error occurs. For example

{
  "Command": "type",
  "Target": "id=username",
  "Value": "eren"
},
{
  "Command": "localStorageExport",
  "Target": "log",
  "Value": ""
},

If the type command fails. I kantu cannot access to localStorageExport command. How can i achive this?

  • [error] timeout reached when looking for element ‘id=username1’

  • [info]b Macro failed (Runtime 27.34s)

Add this part before fhe login code

{
  "Command": "store",
  "Target": "true",
  "Value": "!errorignore"
},

Actually im looking for without errorIgnore, in command line script.

{
  "Command": "store",
  "Target": "false",
  "Value": "!errorignore"
},
{
  "Command": "type",
  "Target": "id=username",
  "Value": "eren"
},
{
  "Command": "localStorageExport",
  "Target": "log",
  "Value": ""
},

with this sequence i ve to check the last state of macro.

Use if command and save in csv the data