In the run time settings we see the option "Continue on Error" which is used when you want to continue executing the script even after encountering a failure/error.
In some cases you dont want to use Continue on Error option in Run time settings but want to use that for a specific part of the script, below steps can help you to do that.
In the below example, you want to capture a dynamic value and at that same time that dynamic value can appear intermittently. It comes for 1 iteration but not the other, so i have used "Notfound=Warning", and because script fails if value is not found I have placed lr_continue_on_error at the start and end of that step.
// Set Continue On Error
lr_continue_on_error(1);
// Save the error message if any
web_reg_save_param("error_message",
"LB=Message0 >> ",
"RB=\r\n",
"Search=Body",
"IgnoreRedirections=Yes",
"Notfound=Warning",
LAST);
Web_url("name",
"..........",
LAST);
// Turn off Continue On Error
lr_continue_on_error(0);
In some cases you dont want to use Continue on Error option in Run time settings but want to use that for a specific part of the script, below steps can help you to do that.
In the below example, you want to capture a dynamic value and at that same time that dynamic value can appear intermittently. It comes for 1 iteration but not the other, so i have used "Notfound=Warning", and because script fails if value is not found I have placed lr_continue_on_error at the start and end of that step.
// Set Continue On Error
lr_continue_on_error(1);
// Save the error message if any
web_reg_save_param("error_message",
"LB=Message0 >> ",
"RB=\r\n",
"Search=Body",
"IgnoreRedirections=Yes",
"Notfound=Warning",
LAST);
Web_url("name",
"..........",
LAST);
// Turn off Continue On Error
lr_continue_on_error(0);