fbpx

Wait and thread sleep

Wait and thread sleep

Home Forums Ask Expert Wait and thread sleep

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

      Hi,

      How we can add wait or thread sleep in the script like I have following scripts and in last I need to add wait thread sleep until successful message is shown?
      Application(“Login Screen”).View(“View”).Object(“ser Name”).Click
      Application(“Login Screen”).View(“View”).Object(“ser Name”).Type (“expawq”)
      Application(“Login Screen”).View(“View”).Object(“Password”).Click
      Application(“Login Screen”).View(“View”).Object(“Password”).Type (“August2017”)
      Application(“Login Screen”).View(“View”).Object(“Log On”).Click
      Application(“Store Selection Screen”).View(“View”).Object(“Lnter Store Number or Name”).Click
      Application(“Store Selection Screen”).View(“View”).Object(“Lnter Store Number or Name”).Type (“1651”)

      Regards
      Aqu

      #31348
      Kirill Bulatnikov
      Participant

        Hello Aqu, thanks for your question

        You can use either wait statement (e.g. Wait 5 – to wait 5 seconds), or you can use Exist method for the object you are expecting. By default “Exist” has 45 seconds timeout for object recognition. This value specified in TOOLS – Options – Runtime – Global Timeout. You can set any value whatever you may need – up to 9223372036854775807 milliseconds.
        Also you can specify Exist timeout in the method parameters within script – see screenshot attached.

        Hope that helps.

        Thanks,
        ZAPTEST Team

        Attachments:
        #31352
        Kirill Bulatnikov
        Participant

          Hello Aqu
          I post an answer to your question in the old thread not to make bunch of copies of similar topics.
          Just as example – Wait statement will look following

          Application(“Application”).View(“View 4”).Object(“User Name”).Type (“expawq”)
          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 5
          Application(“Application”).View(“View 5”).Object(“BILKA TILST…”).Click

          Thus ZAPTEST will wait 5 seconds before trying to click object “BILKA TILST”

          Hope that helps.
          Thanks,
          ZAPTEST Team

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

        Virtual Expert

        ZAPTEST

        ZAPTEST Logo