selenium 3.6.0 geckodriver的一次坑
Traceback (most recent call last):
File "./se3.py", line 16, in <module>
dr=webdriver.Firefox(firefox_binary=binary,executable_path=driver_path)
File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 154, in __init__
keep_alive=True)
File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 151, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 240, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 308, in execute
self.error_handler.check_response(response)
File "/opt/python36/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: failed to lookup address information: Name does not resolve
一开始以为是geckodriver的问题,于是在不同的geckodriver换来换去,firefox也试过不同的版本,然而并没有解决。百度了一下也没有相关的问题。
最后还是看错误信息,failed to lookup address information: Name does not resolve,
启动geckodriver的时候1508740937900 geckodriver INFO Listening on 127.0.0.1:4444
想到会不会是/etc/hosts的问题,于是在/etc/hosts上添加
127.0.0.1 localhost
问题解决。
selenium 3.6.0 geckodriver的一次坑的更多相关文章
- 【翻译】Selenium IDE v1.0.11 支持转换格式吗?
原文: http://blog.reallysimplethoughts.com/2011/06/10/does-selenium-ide-v1-0-11-support-changing-forma ...
- Selenium Firefox 官方Webdriver -- Geckodriver 下载地址
Selenium Firefox 官方Webdriver -- Geckodriver 下载地址 https://github.com/mozilla/geckodriver/releases
- tensorflow 1.8, ubuntu 16.04, cuda 9.0, nvidia-390,安装踩坑指南。
被tensorflow 1.8, ubuntu 16.04, cuda 9.0, nvidia-390折磨了5天,终于上坑,留下指南,造福后人. 1.先把依赖搞清楚: tensorflow 1.8依赖 ...
- Selenium WebDriver 3.0 需要注意的事项
以下所有代码基于Java 首先,要使用WebDriver 3.0 的话 请使用JAVA 8(必要) 其次,由于W3C标准化以及各大浏览器厂商的积极跟进,自WebDriver 3.0 之后,Sele ...
- python中使用selenium调用Firefox缺少geckodriver解决方法
from selenium import webdriver driver=webdriver.Firefox() 会报错 解决方法: 因为缺少geckodriver.exe,先到https://gi ...
- selenium win7+selenium2.0+python环境搭建
win7+selenium2.0+python环境搭建 by:授客 QQ:1033553122 步骤1:下载python 担心最新版的支持不太好,这里我下载的是python 2.7(selenium之 ...
- Selenium win7+selenium2.0+python+JetBrains PyCharm环境搭建
win7+selenium2.0+python+JetBrains PyCharm环境搭建 by:授客 QQ:1033553122 步骤1:下载python 担心最新版的支持不太好,这里我下载的是py ...
- selenium 之Ran 0 tests in 0.000s
from selenium import webdriverfrom time import ctime,sleepimport unittestclass TestLogin(unittest.Te ...
- ubuntu下的python请求库的安装——Selenium,ChromeDriver,GeckoDriver,PhantomJS,aiohttp
Selenium安装: pip3 install selenium ChromeDriver安装: 在这链接下载对应版本:https://chromedriver.storage.googleapis ...
随机推荐
- javascript飞机大战-----008积分
/* 创建敌机: */ function Enemy(blood,speed,imgs,scroe){ //敌机left this.left = 0; //敌机top this.top = 0; // ...
- 借助HTML5 Blob实现文本信息文件下载
原理其实很简单,我们可以将文本或者JS字符串信息借助Blob转换成二进制,然后,作为<a>元素的href属性,配合download属性,实现下载. 代码也比较简单,如下示意(兼容Chrom ...
- centos LAMP第二部分apache配置 下载discuz!配置第一个虚拟主机 安装Discuz! 用户认证 配置域名跳转 配置apache的访问日志 配置静态文件缓存 配置防盗链 访问控制 apache rewrite 配置开机启动apache tcpdump 第二十节课
centos LAMP第二部分apache配置 下载discuz!配置第一个虚拟主机 安装Discuz! 用户认证 配置域名跳转 配置apache的访问日志 配置静态文件缓存 配置防盗链 ...
- linux/Mac使用du查看目录占用的磁盘大小
[1]du命令用来查看目录或文件所占用磁盘空间的大小.常用选项组合为: du -sh [2]若要查看一个目录下每个文件和文件夹的磁盘占用空间,使用如下命令: du -ah --max-depth=1 ...
- JDBC连接数据库(一)
原文地址http://www.cnblogs.com/hongten/archive/2011/03/29/1998311.html JDBC连接数据库 创建一个以JDBC连接数据库的程序,包含7个步 ...
- docker——三剑客之Docker Compose
编排(Orchestration)功能是复杂系统实现灵活可操作性的关键.特别是在Docker应用场景中,编排意味着用户可以灵活的对各种容器资源实现定义和管理. 作为Docker官方编排工具,Compo ...
- pyqt简单介绍和使用
QML和PyQT5联合编程 安装pyqt pip3 install PyQT5 main.QML import QtQuick 2.2 import QtQuick.Controls 1.1 impo ...
- IP地址与子网掩码的计算
128.0.0.0=1 192.0.0.0=2224.0.0.0=3 240.0.0.0=4 248.0.0.0=5 252.0.0.0=6 254.0.0.0=7 255.0.0.0=8255.12 ...
- JavaScript Ajax上传文件miniupload.js
用到jquery和layer.js (function ($) { $.fn.miniupload = function (options, callback) { var jqDom = $(thi ...
- viewport 编写 iPhone Friendly 的 Web 应用程序
在了解到iPhone的一些常见布局法后,我们就可以开始着手编写一个真正能在iPhone上跑的页面了.小声说一句,之前我说要布局讨论完了,要进入交互逻辑开发,后来细心一想发现不行,有些东西不讲的话将会对 ...