01-14-2014 10:50 AM - edited 01-14-2014 10:53 AM
I have got error Server not found, in next step I want to print it as lr_output_message in Ajax truClient,
in same step:
1.I take Releated Object tag I trace window (Add Related object) and add tag "Server not found"
2.next step I take catch error and in select Object Identification and try equate here Object Identification == server not found tag in previous step and want to take it as output in runtime log but could not get success
It is printing Object Identification as error but in addition to this I want to print Server not found (error attached with this post)
Smile tomorrow will be worse !!!
01-17-2014 09:31 AM
I think this can be a good way to do it.
- 1. Identify the object or step in which the error should come up.
- 2. Add a catch step after that step. Remeber a catch step can check for different errors. In my example I am looking for errors of "Any" type.
- 3. Add a "If-Verify" step into the Catch step to instruct what to do in case an error occurs.
* For the "If-Verify" step you should provide the object that contains the error message. The arguments are If Object´s Visible Text contains "Server not found"
LR.log ("Server not found", "Error");
The text of the error message can be customized in the first argument and the second argument is the level of the error:
See the attachment for reference.
PD: if you are trying to capture any error message (not just Server not found) the logic is different. Please let me know.