admin管理员组文章数量:1312637
How can I delete cookies in WebDriverJS? I want to run some tests on a website that creates login cookies (and I have to clear cookies each time I want to run the tests).
I want to start a clean session each time I run the test. What can I do?
How can I delete cookies in WebDriverJS? I want to run some tests on a website that creates login cookies (and I have to clear cookies each time I want to run the tests).
I want to start a clean session each time I run the test. What can I do?
Share Improve this question edited Aug 8, 2014 at 11:10 Artjom B. 62k26 gold badges135 silver badges229 bronze badges asked Oct 15, 2013 at 11:23 cristifilipcristifilip 1432 silver badges11 bronze badges 4-
Are you facing any problem in using
deleteAllCookies()
method? – HemChe Commented Oct 15, 2013 at 11:29 - I tried to use driver.manage().deleteAllCookies(); but that's a Java method. I'm using WebdriverJS – cristifilip Commented Oct 15, 2013 at 11:54
-
As seen from the example given under EXAMPLE section in this link
https://github./dmachi/webdriver-js
, we can usesession.deleteAllCookies();
– HemChe Commented Oct 15, 2013 at 12:12 -
in webdriverio it is
client.deleteCookie()
, it removes all cookies – ChristianB Commented Aug 21, 2014 at 7:48
1 Answer
Reset to default 7I can confirm that driver.manage().deleteAllCookies()
works in WebDriverJS.
If you view the source and search for deleteAllCookies
you'll see the function.
https://code.google./p/selenium/source/browse/javascript/webdriver/webdriver.js#1014
本文标签: javascriptDelete cookies in WebDriverJSStack Overflow
版权声明:本文标题:javascript - Delete cookies in WebDriverJS - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741921146a2405012.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论