QTP取得页面时间值与系统当前时间或自定义系统当前时间进行比较

上一篇 / 下一篇  2011-06-23 11:15:35 / 个人分类:QTP学习

页面取得的时间
print_time =Cstr(Mid(LTrim(RTrim(Browser("title:="&ip2).Page("[url==]url:="&ip2).WebTable("innertext[/url]:=   200.*").GetCellData(2,3))),1,16))
自定义格式的系统当前时间
current_time=Cstr(Year(Now)&"-"&Month(Now)&"-"&Day(Now)&"-"& Hour(Now)&":"&Minute(Now))
系统的当前时间
Systime= Cstr(date)
If    print_time= current_time  and  print_time=systime  then
  Msgbox  “系统时间正确”
Else
Msgbox  “系统时间不正确”
End  if

 

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yangdaliang/archive/2010/05/20/5612459.aspx


TAG:

 

评分:0

我来说两句

Open Toolbar