• 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. Sqli-Labs less8-10

    less-8 前置基础知识: 前几关我们用到了布尔盲注的办法,还有一种盲注就是时间盲注,不仅可以用于有回显的盲注,还能用于没有回显的盲注 函数:sleep(1):等待1秒之后再返回页面做出反应 IF( ...

  2. javascript,html,正则表达式,邮箱密码验证

    <!DOCTYPE html> <html>     <head>         <meta charset="utf-8">   ...

  3. 浅看spa单页应用路由

    路由观察浏览器的URL的变更.当URL 变更时,路由会解析它并生成一个新的路由实例. 一个基本的路由是这样的: class Router { private _defaultController: s ...

  4. C# 获得文件的执行路径的方法

    var path = System.Reflection.Assembly.GetEntryAssembly().Location;

  5. ARP:地址解析协议

    我们假设这样一个场景:你需要和你网络中的一个设备进行通信,这个设备可能是某种服务器.你用来创建这个通信的应用已经得到了这个远程主机的ip地址,也意味着系统已经有了用来构建它想要在第三层到第7层传递数据 ...

  6. Linux操作系统基本应用(完结)

      时间:2015-4-10 12:40Linux第一天 Linux基本命令  Linux各文件夹的作用    bin  二进制可执行命令    dev  设备特殊文件    etc  系统管理和配置 ...

  7. Gradient checking

    所需文件:本地下载 Gradient Checking Welcome to the final assignment for this week! In this assignment you wi ...

  8. shiro加密流程

  9. Servlet学习笔记(四)之请求转发与重定向(RequestDispatcher与sendRedirect)

    ServletContext可以实现请求转发(ServletContext请求转发相关内容见之前博客:http://blog.csdn.net/megustas_jjc/article/details ...

  10. 从kratos分析BBR限流源码实现

    什么是自适应限流 自适应限流从整体维度对应用入口流量进行控制,结合应用的 Load.CPU 使用率.总体平均 RT.入口 QPS 和并发线程数等几个维度的监控指标,通过自适应的流控策略,让系统的入口流 ...