Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Synchronize a particular webpage?
#6
Solved: 11 Years, 3 Months, 1 Week 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


Messages In This Thread
RE: How to Synchronize a particular webpage? - by surya_7mar - 07-31-2008, 02:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  webpage WinObject has same name Ananthakumar_S 0 1,678 11-30-2016, 09:48 PM
Last Post: Ananthakumar_S
  Check specific links of a webpage rocky9 1 2,673 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,641 08-27-2014, 04:09 PM
Last Post: vinod123
  Handling .NET framework menu in webpage using QTP 10 vishnu1067 0 2,322 05-15-2014, 05:30 PM
Last Post: vishnu1067
  Comparing webtable data with weblist and webelements in other webpage arnav 1 5,786 04-18-2014, 10:01 PM
Last Post: Parke

Forum Jump:


Users browsing this thread: 1 Guest(s)