代码运行到这:driver.add_cookie(cookies),报错了

相信坑了不少人,接下来是解决办法

driver.add_cookie(cookies)

cookies = {
"name": "你的KEY", "value": "你的Value"
}
driver.add_cookie(cookies)
就成功了,如果要添加多个就用for
记录此坑

报错:selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: missing 'name'的更多相关文章

  1. 解决selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'

    解决selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: invalid 'expiry'   ...

  2. Selenium click不生效 报错selenium.common.exceptions.InvalidArgumentException

    记录在使用selenium过程中踩的坑------ 在使用selenium时,用click点击网站弹出的文件上传框的"上传文件"按钮不生效,报错selenium.common.ex ...

  3. robotframework执行用例时,报错selenium.common.exceptions.WebDriverException: Message: unknown error: cannot get automation extension from unknown error: page could not be found: chrome-extension://aapnijgdinl

    在用robotframework编写移动端测试用例(用chrome浏览器模拟手机浏览器),执行用例时, 报错selenium.common.exceptions.WebDriverException: ...

  4. python无法启动火狐浏览器且报错“selenium.common.exceptions.WebDriverException: Message: Unable to find a matching set of capabilities”

    安装了python2,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

  5. windows下使用selenium报错selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH

    问题 :执行程序代码报错: WebDriverException:Message:'geckodriver'executable needs to be in Path 或者 selenium.com ...

  6. 【Selenium】【BugList7】执行driver.find_element_by_id("kw").send_keys("Selenium"),报错:selenium.common.exceptions.InvalidArgumentException: Message: Expected [object Undefined] undefined to be a string

    [版本] selenium:3.11.0 firefox:59.0.3 (64 位) python:3.6.5 [代码] #coding=utf-8 from selenium import webd ...

  7. selenium的报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class names not permitted

    报错信息:selenium.common.exceptions.InvalidSelectorException: Message: invalid selector: Compound class ...

  8. 关于Selenium.common.exceptions.WebDriverException: Message: Invalid locator strategy: css selector 的问题

    在执行脚本时报Selenium.common.exceptions.WebDriverException: Message: Invalid locator strategy: css selecto ...

  9. selenium使用报错“selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.”

    安装了python3,使用pip安装了selenium,但是在使用时,报了“selenium.common.exceptions.WebDriverException: Message: 'gecko ...

随机推荐

  1. 六张图详解LinkedList 源码解析

    LinkedList 底层基于链表实现,增删不需要移动数据,所以效率很高.但是查询和修改数据的效率低,不能像数组那样根据下标快速的定位到数据,需要一个一个遍历数据. 基本结构 LinkedList 是 ...

  2. 关键字——this,super,static,final

    this 理解为当前对象. //测试 public static void main(String[] args){ Person person = new Person(3, "xiaoM ...

  3. sort基本用法

    sort 选项 -u --去除重复行 -r --降序排列,默认是升序 -o --由于sort默认是把结果输出到标准输出,所以需要用重定向才能将结果写入文件,形如sort filename > n ...

  4. leetcode二叉树题目总结

    leetcode二叉树题目总结 题目链接:https://leetcode-cn.com/leetbook/detail/data-structure-binary-tree/ 前序遍历(NLR) p ...

  5. vue在Docker上运行

    Dockerfile # 设置基础镜像 FROM nginx:latest # 定义作者 MAINTAINER test # 将dist文件中的内容复制到 /etc/nginx/html/ 这个目录下 ...

  6. NC50965 Largest Rectangle in a Histogram

    NC50965 Largest Rectangle in a Histogram 题目 题目描述 A histogram is a polygon composed of a sequence of ...

  7. 跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式

    问题描述 在 C/C++ 开发中,使用 printf 打印 64 位变量比较常用,通常在 32 位系统中使用 %lld 输出 64 位的变量,而在 64 位系统中则使用 %ld: 如果在 32 位系统 ...

  8. JDBC:处理事务

    1.如何实现事务 如果现在希望对 A 表和 B 表同时删除某一个 id 号的记录,使这两个sql操作组成一个事务.(成功则同时成功,否则都失败) 注意:如果 B 表 建立了引用 A 表的id外键,并指 ...

  9. mongodb 数据块迁移的源码分析

    1. 简介 上一篇我们聊到了mongodb数据块的基本概念,和数据块迁移的主要流程,这篇文章我们聊聊源码实现部分. 2. 迁移序列图 数据块迁移的请求是从配置服务器(config server)发给( ...

  10. java--运算符和表达式

    运算符:就是对常量或者遍历进行操作的符号: 表达式:用运算符把常量或者变量连接起来符合java语法的式子称为表达式,不同运算符连接的表达式体现的是不同类型的表达式. 一.算术运算符 1.使用%运算符: ...