Quantcast
Channel: LoadRunner Practitioners Forum topics
Viewing all articles
Browse latest Browse all 3978

Please help me out in understanding error handling technique using web_reg_find

$
0
0

What is the difference between the below two error handling techniques, which one can be opted for day to day scripting usage.
The main issue which I see while using "lrexit (second type)" error handling is in vugen for e.g. if I run 3 iterations for a script which should fail, in test results only the first iteration shows as failed the rest two iteration gets displayed as passed even though they get exited out of the code.

Please explain the better method to use and how to make sure the script doesn't proceed further when a text check fails.

Error handling technique 1:
********************************
web_reg_find("text=xxx", "savecount=xxxx", "fail=notfound")

AND


Error handling technique 2:
********************************
web_reg_find("text=xxx", "savecount=abccount")

if(atoi(lr_eval_string("{abcount}"))==0)
{
lr_error_message("the page failed to load");
lr_end_trnsaction("abcd",LR_FAIL);
lr_exit("lr_exit_iteration_and_continue",LR_FAIL);
}
lr_end_transaction("abcd",LR_AUTO);


Viewing all articles
Browse latest Browse all 3978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>