Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete cookies in WebDriverJS

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?

like image 712
cristifilip Avatar asked Oct 15 '13 11:10

cristifilip


1 Answers

I 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.com/p/selenium/source/browse/javascript/webdriver/webdriver.js#1014

like image 119
Nucleon Avatar answered Sep 20 '22 19:09

Nucleon