I have run into an issue where I am trying to launch many tests at once(using html suites) they launch find, but the issue comes in when selenium is taking the screenshots that are in the html tests since the location of the screenshots is hardcoded I can not automatically create a new folder on the fly for the screenshots so that the next test does not over write the screenshots. How do you guys handle running many tests while capturing screenshots for the scripts an开发者_如何转开发d storing them?
Either store them in a different location or store them in the same location with a different name for each run.
I can't get the captureEntirePageScreenshot command to work with FF5 due to permission denied errors so you'll have to test this.
Try using storeEval to generate a timestamp from javascript and use the variable in the screenshot file name.
<tr>
<td>storeEval</td>
<td>new Date().getTime();</td>
<td>dateTimestamp</td>
</tr>
<tr>
<td>captureEntirePageScreenshot</td>
<td>c:\screenshot-${dateTimestamp}.png</td>
<td></td>
</tr>
精彩评论