• 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. Linux 记录学习

  2. 如何在指定的地址上创建C++对象

    如果已经掌握在静态存储区上创建对象的方法,那么可以扩展一下,可以在任意地址上创建C++对象. 解决方案:-在类中重载new/delete操作符-在new的操作符重载函数中返回指定的地址-在delete ...

  3. Git(GitHub)配合TortoiseGit使用

    1.首先下载安装配置Git 安装请参照 https://www.cnblogs.com/xueweisuoyong/p/11914045.html 配置请参照 https://www.jianshu. ...

  4. 【Office Excel】vlookup函数的反向查找实例教程,不只是正向查找,还可以反向查找,实例讲解

    VLOOKUP 反向查询 众所周知,vlookup只能从左向右查找,而不能从右至左的反向查找.为此高手们设计了一个让无数新手迷惑的公式.今天优爱酷将彻底帮同学们解开这个迷团. [例]如下图所示要求根据 ...

  5. Linux centos7 find 命令

    2021-08-13 1. 命令简介 find 命令用来在指定目录下查找文件.任何位于参数之前的字符串都将被视为欲查找的目录名.如果使用该命令时,不设置任何参数,则 find 命令将在当前目录下查找子 ...

  6. msyql redo log和binlog

    更新语句执行流程 下面是这个表的创建语句,这个表有一个主键 ID 和一个整型字段 c: create table T(ID int primary key, c int); 如果要将 ID=2 这一行 ...

  7. vue 引用省市区三级联动(element-ui Cascader)

    npm 下载 npm install element-china-area-data -S main.js import {provinceAndCityData,regionData,provinc ...

  8. bat 使用ftp进行文件上传

    实例 @echo off rem 打开远程ftp echo open 172.16.137.23 > ftpconfig.txt rem 使用匿名用户登录 echo user anonymuou ...

  9. openwrt开发笔记一:源码下载与编译

    1.1 环境要求 编译系统:Linux发行版(本文使用Ubuntu) 编译一个可以安装的OpenWrt固件镜像文件(大约8MB大小的),你需要: 一个纯净的OpenWrt编译系统大约需要200MB的空 ...

  10. Appium问题解决方案(7)- Could not find 'adb.exe' in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path

    背景:运行代码提示找不到ADB An unknown server-side error occurred while processing the command. Original error: ...