Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Synchronize a particular webpage?
#1
Solved: 11 Years, 4 Months ago
For example : After giving userid and password, the next page may take sometime to comeup. It may take 2secs or 5 mins depending on net speed. So, i can synchronize the next page based on a particular bitmap or button or text or anything on that page. But here I don't want to specify any time limit because I don't know when the next page will come up.
So, is there any way to solve it ?
Reply
#2
Solved: 11 Years, 4 Months ago
U can use Browser("-").Sync or waitproperty() method
Regards
Raj
Reply
#3
Solved: 11 Years, 4 Months ago
You can wait until the you saw Done on the Browser Status.

Try to ass the browser status object and wait until browser status object is done
Reply
#4
Solved: 11 Years, 4 Months ago
Hye Surya,

Can u pls explain with more info? how can we make the script to wait until we saw Done on the Browser Status?

Any thing like code for refference

Regards
Raj
Reply
#5
Solved: 11 Years, 4 Months ago
Any updates on this

Regards
Raj
Reply
#6
Solved: 11 Years, 4 Months ago
Sorry i just came to this message.

here is the Function which will wait until the Browser gets loaded.
You can call after every operatins that need page to be refreshed.

Usage Ex:
Code:
Browser("Browser").Sync



' Function Sync
' -----------------------
' Supply default method that returns immediately, to be used in the Frame test object.
' Returns - True.

'@Description Waits for the  test  object to synchronize
'@Documentation Wait for the <Test object name> <Test object type> to synchronize before continuing the run.
Public Function Sync(obj)
   wait(1)    ''Updated by surya on 05/19/2008
  
   Sync = True
   If obj.Dialog("text:=.*").Exist(1) or obj.Dialog("nativeclass:=#32770").Exist(1) Then
       Exit Function
   End If
   If obj.WinStatusBar("nativeclass:=msctls_statusbar32").GetROProperty("text") = "Done"  Then
       wait(1)
   End If
   obj.WinStatusBar("nativeclass:=msctls_statusbar32").MouseMove 1,1
   sText = obj.WinStatusBar("nativeclass:=msctls_statusbar32").GetROProperty ("text") '.WaitProperty "text", "Done", 1000

   If INStr(sText, "http") <> 0 Then
       wait(1)
       obj.WinStatusBar("nativeclass:=msctls_statusbar32").MouseMove 1,1
       sText = obj.WinStatusBar("nativeclass:=msctls_statusbar32").GetROProperty ("text") '.WaitProperty "text", "Done", 1000
   End If
   While obj.WinObject("regexpwndclass:=msctls_progress32", "object class:=msctls_progress32","nativeclass:=msctls_progress32").Exist(1)
   Wend
   iWaitTime = 5000
   i=1
   While (InStr(sText, "Opening") <> 0 or InStr(sText, "Downloading") <> 0 or InStr(sText, "Applet Grid Started") <> 0 ) and i<iWaitTime
        obj.WinStatusBar("nativeclass:=msctls_statusbar32").MouseMove 1,1
       sText = obj.WinStatusBar("nativeclass:=msctls_statusbar32").GetROProperty ("text") '.WaitProperty "text", "Done", 1000
       wait(1)
       i=i+1
   Wend
   'Applet Grid Started
'  obj.WinStatusBar("nativeclass:=msctls_statusbar32").WaitProperty "text", "Done", 1000
  
End Function
RegisterUserFunc "Browser", "Sync", "Sync"
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  webpage WinObject has same name Ananthakumar_S 0 1,699 11-30-2016, 09:48 PM
Last Post: Ananthakumar_S
  Check specific links of a webpage rocky9 1 2,714 06-11-2015, 06:23 PM
Last Post: venkatesh9032
Exclamation How to verify whether pdf is completely loaded or not in webpage nmakkena 1 2,685 08-27-2014, 04:09 PM
Last Post: vinod123
  Handling .NET framework menu in webpage using QTP 10 vishnu1067 0 2,342 05-15-2014, 05:30 PM
Last Post: vishnu1067
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,816 04-18-2014, 10:01 PM
Last Post: Parke

Forum Jump:


Users browsing this thread: 1 Guest(s)