How To handle Page cannot be displayed error
Hi All,
while running my QTP Scripts sometimes my application does not come up and IE Page displayes as Page cannot be displayed.
It is not exactly Server crash for which i can use Exceptional handling.
I would like my script to restart or i want it to stop and display me a message in results.
How can i handle this?
Re: How To handle Page cannot be displayed error
[QUOTE=sunil.betageri;31465]Hi All,
while running my QTP Scripts sometimes my application does not come up and IE Page displayes as Page cannot be displayed.
It is not exactly Server crash for which i can use Exceptional handling.
I would like my script to restart or i want it to stop and display me a message in results.
How can i handle this?[/QUOTE]
Use the recovery scenario such that it idntifies the page. And in the action write what ever you want..
If you want to stop the test make the function and write down [B]ExitTest[/B]
Hope this will work.... Tell me if it works
Re: How To handle Page cannot be displayed error
Browser("[ABC]").Page("[ABC1]").Sync
IF NOT Browser("[ABC]").Page("[ABC1]").WebEdit("txtbox").Exist THEN
Reporter.ReportEvent(micFail,"Page1","Page cannot be displayed.")
END IF
-Here I have used WebEdit("txtbox"). You can use any web object that gets displayed on the page by default.