Selenium Webdriver:删除所有域上的Cookie [英] Selenium Webdriver: Delete Cookies On All Domains

查看:200
本文介绍了Selenium Webdriver:删除所有域上的Cookie的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在硒中,您只能删除当前域中的Cookie,但可以导航到Firefox存储Cookie的文件,并删除文件或覆盖文件?我一直在环顾四周,但无法找到在哪里硒储存cookie。

解决方案

您可以指定一个用户目录和然后操作< userdir> / Default / Cookies 。这个问题是类似的:获取或操纵Selenium Webdriver中的所有cookie


In selenium you can only delete cookies on the current domain, but would it be possible to navigate to the file where Firefox is storing the cookies and either delete the file or overwrite it? I've been looking around, but can't find where selenium stores the cookies.

解决方案

You can specify a user directory and then manipulate <userdir>/Default/Cookies. This question is similar: Getting or Manipulating all cookies in Selenium Webdriver

这篇关于Selenium Webdriver:删除所有域上的Cookie的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆