fbpx

How to stop script

How to stop script

Home Forums Ask Expert How to stop script

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #31450
    Asif Qureshi
    Participant

      Hi ZAPTEST Team,

      I am facing one problem. Please suggest me how can i handle this scenario.

      Scenario:
      When net is available then welcome page is opened when net is off the error message is shown and script give me error and script should be stopped. currently script is moved to other line and net is off.

      Please see the attached file

      Regards,
      AQU

      Attachments:
      #31451
      Sasha ZAP
      Moderator

        Hello aqu,

        Basically you can set a condition such as:

        If Application(“Application”).View(“View”).Object(“Welcome”).Exist Then
        Application(“Application”).CustomReport True, “Welcome page Success”, “Welcome page appeared Successfully.”, True
        Else
        Application(“Application”).CustomReport False, “Welcome page Error”, “Net is off and the welcome page did not appear.”, True
        ZAP.StopTest
        End If

        The “Object(“Welcome”)” you can change to any expected object which appears only in the Welcome page.

        Thanks,
        ZAPTEST Team

      Viewing 2 posts - 1 through 2 (of 2 total)
      • You must be logged in to reply to this topic.

      Virtual Expert

      ZAPTEST

      ZAPTEST Logo