Customize Wait Statement in QTP

In QTP, it’s good to use customize Wait statements rather than using Sync property of Browser. The way test case is written in QTP is perform some action and wait for the result to verify. And these results are mostly the response from the server which results in loading new page. Below is a function which solves this problem and can be easily used and improves the readability of the script.
Function Wait_For_PageLoad(BrowsName,PageName)
    Browser(BrowsName).Sync
    Browser(BrowsName).Page(PageName).Sync
    Browser(BrowsName).Page(PageName).WaitProperty "visible",true,10000

End Function

Comments

Popular posts from this blog

The 3 qualities that will always help you become better at almost anything…

Embracing the Journey: Finding Joy in the Process

How to install Android Emulator on Windows