I'm trying to figure out what the syntax is to record the times it takes to run a test script in Selenium IDE. How do I record the start and end times in the script (using html)?
A:
IIRC, it does do this already. In fact if any test runner does not record that, I would log a feature request :)
leppie
2009-05-06 15:56:10
A:
You'd probably have to execute some javascript statements.
storeEval | javascript{var startTime=new Date().getTime(); startTime;} | startingtime
setSpeed | 500
open | http://www.google.com/
setSpeed | 0
storeEval | javascript{var endTime=new Date().getTime(); endTime;} | endingtime
echo | ${startingtime}
echo | ${endingtime}
Edit code for elapsed time:
storeEval | javascript{startTime=new Date().getTime(); startTime;} | startingtime
setSpeed | 500
open | http://www.google.com/
setSpeed | 0
storeEval | javascript{endTime=new Date().getTime(); endTime;} | endingtime
storeEval | javascript{var duration = endTime - startTime;duration;} | dur
echo | ${startingtime}
echo | ${endingtime}
echo | ${dur}
s_hewitt
2009-05-06 16:03:08