Results 1 to 3 of 3

Thread: How To handle Page cannot be displayed error

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Answers
    1

    Question 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?


  2. #2
    Junior Member
    Join Date
    Feb 2008
    Answers
    24

    Re: How To handle Page cannot be displayed error

    Quote Originally Posted by sunil.betageri View Post
    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?
    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 ExitTest

    Hope this will work.... Tell me if it works


  3. #3
    Expert Member
    Join Date
    Nov 2006
    Answers
    518

    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.

    Lack of WILL POWER has caused more failure than
    lack of INTELLIGENCE or ABILITY.

    -sutnarcha-

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact