不要追求绝对的公平,红尘之中没有公平而言,人活一世,难得糊涂。
it is no use doing what you like, you have got to like what you do.
GUI计时设置
上一篇 /
下一篇 2007-01-15 17:40:41
/ 个人分类:Robot技术
ROBOT中提供的 StartTimer "time"51Testing软件测试网8MgDrl命令不能直接输出啊,只能在日志里看51Testing软件测试网p1ea.\U:C}E,V
}'mg4hpo0如果我们想在CONSOLE中看的话:51Testing软件测试网
V'f?,|6mp:x
:d
H B1WCE;O(h0Sub Main
e0O"C:G2A5X VS0u:s#w#u^
x(N0Dim Start_time
S
z5fsb
V(Z4w:t%a3b0Dim End_time
/K1a1N5I#tt0Dim Total_time
9n$W#pcR?051Testing软件测试网Jz(SN+qu7rIStart_time = time
o/?'V+Y6r(e7@^-c
dr0N'W5b;W!Yn{z
q0'执行的语句
9oG'U!|)mY
}0%jTBO K
} u.\6KP0End_time =time
x/se Dgi0Total_time = End_time - Start_time
51Testing软件测试网&N,o
v!z#Qy/`b(n+I0I"^q'E(X7m8`0SQAConsoleWrite("
脚本运行用时共:"&Total_time)
51Testing软件测试网u_)U'[4hm5L
i51Testing软件测试网]0h [,}7Hp]tEnd Sub
!f8d#zl3Fk7D051Testing软件测试网%]4f zG.w这个只可以精确到秒!!!!
!@4MBJ@051Testing软件测试网9e9vAZ*vie6f(q那就只能调用API函数拉。Robot可以调用系统函数
:w+R4?3H QR1QR&xG0Type SYSTEMTIME
X-E\[*t'Ru
Y"T0 wYear As Integer
!]M*v,S/K p0y@_&q%pw,x0 wMonth As Integer
U)Yf}2N0 wDayOfWeek As Integer
51Testing软件测试网5P{ u ?1yP,Jt { wDay As Integer
2l
^
dQ/WE4\0 wHour As Integer
51Testing软件测试网.lf(V
EVw2l(i }6g~{ wMinute As Integer
51Testing软件测试网6dpzM$z,@jd"Aa)w wSecond As Integer
zWvO,b"W0 wMilliseconds As Integer
A^'@G&AXA0End Type
{\9k!c0d#eu}0,kx m!o:A7C)lTL0Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
J_
s4p6@Pl0Declare function GetDay() as string
}5Ml*i;uyn)E0'系统的日期信息,精确到毫秒
,Gwz:UQTh&A#{1Q ]
b0function GetDay() as string
51Testing软件测试网+r
?B"l-isE51Testing软件测试网,i\'zkK;_j9})]ddim systime as systemtime
AU&xZN0GetLocalTime systime
O;y%e:O0SV"_l0GetDay=cstr(systime.wYear) + "-" + cstr(systime.wMonth) + "-" +
cstr(systime.wDay)+"
"+cstr(systime.wHour)+":"+cstr(systime.wMinute)+":"+cstr(systime.wSecond)+":"+cstr(systime.wMilliseconds)
51Testing软件测试网IjseFh%?eLend function
51Testing软件测试网)} {n5LML;vbPK
d;k051Testing软件测试网$][4L9AErC}{ o9D
相关阅读:
- SQAConsoleWrite/clear函数解释 (Spark.lee, 2007-2-05)
- SQALogMessage (Spark.lee, 2007-2-05)
- GUI登陆程序 (Spark.lee, 2007-2-10)
- Robot 的自动化功能测试框架 (Spark.lee, 2007-1-09)
- 对比使用 Robot 和Functional Tester (Spark.lee, 2007-1-09)
- 关于验证点(VP) (Spark.lee, 2007-1-09)
- SQAGetProperty应用实例 (Spark.lee, 2007-2-10)
- 测试CQ 登陆 (Spark.lee, 2007-2-10)
- Robot中的文件操作的总结 (Spark.lee, 2007-1-15)
- Robot 批任务定时回放启动 (Spark.lee, 2007-1-15)
收藏
举报
TAG:
Robot技术