开发者

Clearing cookies between selenium HTML tests?

I'm running my HTML tests as such with selenium-server 2.2:

java -jar /var/lib/selenium/selenium-server.jar -ensureCleanSession -htmlSuite *firefox http://$HOST ./test/selenium/html/TestSuite.html ./target/selenium/html/TestSuiteResults.html

For some reason, I can't seem 开发者_运维技巧to get cookies to clear between individual tests in a test suite. Is there anything I can do to clear cookies between tests?


Maybe I am over-simplifying, but if you are aware of the domain in which your tests are running (and in turn, need to clear the cookies off them), you could use selenium.deleteAllVisibleCookies(); as your final and initial test condition, between iterations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜