-1

Selenium IDE - HTML 中的测试用例从开始到结束。

做什么命令/目标有用?

请举个例子?

4

1 回答 1

0

有点大,但是可以用=P

[info] Executing: |storeEval | javascript{(new Date().getHours())} | hStart |
[info] script is: 2
[info] Executing: |storeEval | javascript{(new Date().getMinutes())} | mStart |
[info] script is: 8
[info] Executing: |storeEval | javascript{(new Date().getSeconds())} | sStart |
[info] script is: 0
[info] Executing: |storeEval | ${hStart}*60*60 | hStartTos |
[info] script is: 2*60*60
[info] Executing: |storeEval | ${mStart}*60 | mStartTos |
[info] script is: 8*60
[info] Executing: |storeEval | ${hStartTos}+${mStartTos}+${sStart} | sStartTotal |
[info] script is: 7200+480+0
[info] Executing: |storeEval | ${sStartTotal}/60 | sTomStartTotal |
[info] script is: 7680/60

[info] Executing: |pause | 300000 | Here your testcase |

[info] Executing: |storeEval | javascript{(new Date().getHours())} | hEnd |
[info] script is: 2
[info] Executing: |storeEval | javascript{(new Date().getMinutes())} | mEnd |
[info] script is: 13
[info] Executing: |storeEval | javascript{(new Date().getSeconds())} | sEnd |
[info] script is: 0
[info] Executing: |storeEval | ${hEnd}*60*60 | hEndTos |
[info] script is: 2*60*60
[info] Executing: |storeEval | ${mEnd}*60 | mEndTos |
[info] script is: 13*60
[info] Executing: |storeEval | ${hEndTos}+${mEndTos}+${sEnd} | sEndTotal |
[info] script is: 7200+780+0
[info] Executing: |storeEval | ${sEndTotal}/60 | sTomEndTotal |
[info] script is: 7980/60
[info] Executing: |storeEval | ${sTomEndTotal}-${sTomStartTotal} | ExeTime |
[info] script is: 133-128
[info] Executing: |echo | ${ExeTime} Minutes | |
[info] echo: 5 Minutes 
于 2013-03-20T08:22:44.063 回答