fbpx

Server Response

Server Response

Home Forums Ask Expert Server Response

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

      Hi ZAPTEST Team,

      Your doing very well. I have question regarding server response. i have a login screen and welcome page is come like 13 seconds. it could be possible welcome page will be come in 13 seconds or above 13 seconds. if i set wait 13. it is work perfectly until 13 seconds. if welcome screen is come around 7 seconds then my script is wait until 13 seconds. So i want to know how we can handle this wait state. we ever server is respond either it is less or more. i don’t want to wait till 13 seconds.
      I hope you understand my problem.

      Please see the below code:
      Application(“Application”).View(“View 4”).Object(“User Name”).Type (“abc”)
      Application(“Application”).View(“View 4”).Object(“Image Object 6”).Click
      Application(“Application”).View(“View 4”).Object(“Image Object 6”).Type (“August2017”)
      Application(“Application”).View(“View 4”).Object(“Log On”).Click
      Wait 10

      Regards,
      AQU

      #31367
      Sasha ZAP
      Moderator

        Hello aqu,

        If you want to continue your test the moment the Welcome page appears you need to do 2 things:
        1. Add to the ZAPTEST Object Repository an object which represents mostly the Welcome page (For example, if a “Welcome” string appears this can be such object), this object ZAPTEST should find without any problems during runtime.
        2. Set the following condition:

        If Application(“App”).View(“View”).Object(“Welcome”).Exist Then
        Application(“App”).CustomReport True, “Welcome Success”, “The Welcome page appeared as expected.”, True
        Else
        Application(“App”).CustomReport False, “Welcome Error”, “The Welcome page did not appear.”, True
        End If

        You can set a waiting time till the Exist method will fail at the Tools -> Options -> Runtime -> Global Timeout (Its value is set in miliseconds).

        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