开发者

Selenium2: Deleting ALL cookies, even ones not related to the current domain

开发者 https://www.devze.com 2023-03-27 10:37 出处:网络
I am writing a test which needs to delete cookies from a number of domains when it starts up.driver.manage().deleteAllCookies() seems to only delete cookies set by the domain you\'re currently on. 开发

I am writing a test which needs to delete cookies from a number of domains when it starts up. driver.manage().deleteAllCookies() seems to only delete cookies set by the domain you're currently on. 开发者_如何学运维

Is there a way to force the browser to clear all cookies?


May be this post will point you in the right direction?

http://groups.google.com/group/ruby-capybara/browse_thread/thread/7d94606d2c2abaf

https://gist.github.com/474236


You should use one profile if you want to delete all cookies. If every time selenium is creating new anonymous profile it is not possible to delete those cookies.

0

精彩评论

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