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
Post a Comment
Your comments will be reviewed and then published !