简单快乐的工作,生活!

等待页面loading

上一篇 / 下一篇  2014-04-14 14:45:00 / 个人分类:QTP

Function ChangeDate(start_date, end_date)
  Dim MyPage, SearchBox, needCalc
  needCalc = False
  Set MyPage = Browser("Mercer Globe").Page("FSM Pro")
  If start_date <> "" Then
   Set SearchBox = MyPage.RunScript("document.getElementsByName('_FSMonitor$_StartDateTextbox')(0) ;")
   Print "Current start date is " & SearchBox.Value
   If SearchBox.Value <> start_date Then
    Print "Update start date to ->"&start_date
    SearchBox.Value = start_date
    needCalc = True
   End If
  End If
  
  If end_date <> "" Then
   Set SearchBox = MyPage.RunScript("document.getElementsByName('_FSMonitor$_EndDateTextbox')(0) ;")
   Print "Current end date is " & SearchBox.Value
   If SearchBox.Value <> end_date Then
    Print "Update end date to ->" &end_date
    SearchBox.Value = end_date
    needCalc = True
   End If
  End If
  If needCalc Then
   MyPage.Image("Calculate").Click
   Call WaitPageLoading(MyPage)
  End If
End Function
 
 
Function WaitPageLoading(myPage)
    On error resume next
 While myPage.Object.readyState <> "complete"
 Wend
End Function
 
 
 
 

TAG: loading page Page Wait wait

 

评分:0

我来说两句

我的栏目

日历

« 2024-04-27  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 12881
  • 日志数: 15
  • 书签数: 3
  • 建立时间: 2007-04-04
  • 更新时间: 2014-12-01

RSS订阅

Open Toolbar