• window10系统,先cmd打开chrome,

    chrome --remote-debugging-port=9222
  • 执行脚本
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By def test_adduser():
options=Options()
options.add_experimental_option('debuggerAddress', '127.0.0.1:9222')
driver=webdriver.Chrome(options=options)
driver.implicitly_wait(5)
driver.find_element(By.CSS_SELECTOR,'.js_service_list a:nth-child(1) .index_service_cnt_item_title').click()
  • 报错
>       raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:9222
E from chrome not reachable ..\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py:242: WebDriverException
  • 发现打开调试浏览器一段时间后,就会连不上,这是需要关闭浏览器,重新执行chrome --remote-debugging-port=9222
  • 再不行,重启电脑,问题解决

cannot connect to chrome at 127.0.0.1:9222的更多相关文章

  1. Linux无法正常连接服务器,无法连接上 127.0.0.1:8989 (127.0.0.1)。 - connect (111: 拒绝连接)

    最近修改了下电脑的hosts文件,电脑就突然不能连接下载更新的服务器了,但是浏览器还能正常上网,这让我很是难受啊!!! 错误现象如下: 错误:1 http://archive.ubuntukylin. ...

  2. MongoDB 由于目标计算机积极拒绝,无法连接 2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061

    转载自:http://www.cnblogs.com/xiaoit/p/3867573.html 1:启动MongoDB 2014-07-25T11:00:48.634+0800 warning: F ...

  3. 1.MongoDB报错 Failed to connect 127.0.0.1:27017 Mongo运行错误

    1.Mongo运行错误:Failed to connect 127.0.0.1:27017 Mongo运行错误:Failed to connect 127.0.0.1:27017,reason:err ...

  4. selenium在Eclipse中打开fireFox浏览器是报报错connect to host 127.0.0.1 on port 7055

    1.相信很多同学刚接触selenium时,在Eclipse中打开fireFox浏览器是报报错: org.openqa.selenium.firefox.NotConnectedException: U ...

  5. 【MongoDB】2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errno:10061 由于目标计算机积极拒绝,无法连接。

    1:启动MongoDB 2014-07-25T11:00:48.634+0800 warning: Failed to connect to 127.0.0.1:27017, reason: errn ...

  6. Selenium2学习-038-firefox、webdriver版本不对称问题解决:org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055

    今天有个朋友在群里问,为何脚本运行不通过,其脚本操作步骤简单描述如下: 1.启动火狐浏览器 2.打开百度 3.查询框输入关键字 4.点击按钮[百度一下] 脚本挺简单的,其给出的应用报错信息如下所示: ...

  7. 解决org.openqa.selenium.WebDriverException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms org.springframework.beans.BeanInstantiation

    解决方法为将selenium-server-standalone-2.37.0.jar升级至selenium-server-standalone-2.41.0.jar即可. 下载地址:http://s ...

  8. mysql闪退或者can not connect 127.0.0.1

    MYSQL 无安装文件 exe执行时闪退 mysql闪退或者can not connect 127.0.0.1 APP 百款主流机型兼容性免费测 »   Mysql  官网上下载的Mysql 但是没有 ...

  9. mongo链接报错:couldn't connect to server 127.0.0.1:27017 (127.0.0.1)

    angela@angeladeMacBook-Air:/data/db$mongo MongoDB shell version: 2.6.1 connecting to: test 2014-06-0 ...

随机推荐

  1. CPU 指令环 ring0,ring1,ring2,ring3

    Intel的CPU将特权级别分为4个级别:RING0,RING1,RING2,RING3. Windows只使用其中的两个级别RING0和RING3,RING0只给操作系统用,RING3谁都能用.如果 ...

  2. JavaScript(Node.js)+ Selenium 实现淘宝抢单

    JavaScript(Node.js)+ Selenium 淘宝抢单 为了买买买我也是拼了,看了一点selenium的资料,随便写的. 程序写的比较烂,但是够我自己用了,望各路大牛指教. 使用说明: ...

  3. Centos7 出现Welcome to emergency mode!【紧急模式】

    Centos7 出现Welcome to emergency mode![紧急模式] 做mount挂载时,修改了  /etc/fstab 文件,导致Centos7重启时出现如下图所示错误:   输入r ...

  4. JSOUP教程目录

    入门: 1.解析和遍历一个HTML文档 输入: 2.解析一个HTML字符串 3.解析一个body片断 4.从一个URL加载一个Document 5.从一个文件加载一个文档 数据抽取: 6.使用DOM方 ...

  5. Oracle插入中文乱码问题

    PLSQL执行一条插入代码,两个字符既显示超长,一个字符插入后乱码 insert into person (pid, pname) values (1,'明'); Google查询说原因是Oracle ...

  6. 漫画CAS 的ABA 问题

    链接:https://blog.csdn.net/bjweimengshu/article/details/79000506

  7. 一. Go微服务--隔离设计

    1. 前言 隔离设计源于船舶行业,一般而言无论大船还是小船,都会有一些隔板,将船分为不同的空间,这样如果有船舱漏水一般只会影响这一小块空间,不至于把整个船都给搞沉了. 同样我们的软件服务也是一个道理, ...

  8. Learning ROS: Managing System dependencies

    Download and install the system dependencies for turtlesim: roscd turtlesim cat package.xml rosdep i ...

  9. Learning ROS: Recording and playing back data

    本文主要部分来源于ROS官网的Tutorials. Description: This tutorial will teach you how to record data from a runnin ...

  10. HCNP Routing&Switching之OSPF外部路由类型以及forwarding address

    前文我们了解了OSPF的4类.5类LSA,回顾请参考https://www.cnblogs.com/qiuhom-1874/p/15222969.html:今天我们来聊一聊外部路由类型和forward ...