Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Page Loaded SuccessFully
#1
Solved: 11 Years, 4 Months ago
Whenever we open a Site through Tool then How Would we come to know that the page is being loaded successfuly/completely OR all the objects in the page are loaded
Reply
#2
Solved: 11 Years, 4 Months ago
does this mean - you want your script to not to proceed until the page is loaded completely?
if so - you can use 'Sync' method which will wait till the page completely loaded.
Code:
Browser().Page().Sync

Reply
#3
Solved: 11 Years, 4 Months ago
Hi
I tried Sync in the below mentioned Code
Code:
systemutil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE","MY URL"
Browser("Workspace").Page("Workspace").Sync
msgbox "Done"

Here the 'Done" message gets displayed even before the page is loaded (as i can see few of the images are still getting loaded and the Done message has apperared in front end) it means the Sync is not working in my case
Could u pls suggest me any alternatibve method
Reply
#4
Solved: 11 Years, 4 Months ago
In this case, you can use
Code:
While Browser("Workspace").Page("Workspace").Object.readyState <> "complete"
    Browser("Workspace").Page("Workspace").Sync
Wend

Reply
#5
Solved: 11 Years, 4 Months ago
Hi Saket
Thanks for the example you gave and It solved my problem
But still I have a doubt that why we have used Object.readyState and not below statement
Code:
While Browser("Workspace").Page("Workspace").getroproperty("readyState  ") <> "complete"
I tried this statement but it did not work which is giving the NULL output
could you please let me know what is the difference
Reply
#6
Solved: 11 Years, 4 Months ago
GetROProperty method is to retrieve the current value of an identification property. readyState is not an identification property for Page and so it wont work.
see QTP help for more information.

Reply
#7
Solved: 11 Years, 4 Months ago
Thanks saket for the information ; i got my answer from your explanation
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation How to verify whether pdf is completely loaded or not in webpage nmakkena 1 2,691 08-27-2014, 04:09 PM
Last Post: vinod123
  Cannot find the "[ WebButton ]" object's parent "[ Page ]" (class Page) sumitparolkar@gmail.com 4 5,103 05-03-2013, 11:53 PM
Last Post: agarwl.anurag
  Using QTP with dynamically loaded swf QDev 0 1,909 01-18-2013, 08:37 PM
Last Post: QDev
  Verify images get properly loaded or not(Broken Images) in respective pages nilanjans 4 4,080 01-17-2013, 10:51 AM
Last Post: nilanjans
  Checkpoint problems: Checkpoint starts before web page is loaded & therefore fails! IdontGetIt 1 3,923 11-20-2009, 11:45 AM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)