码迷,mamicode.com
首页 > Web开发 > 详细

使用robotframework无法连接webdriver

时间:2017-07-19 20:35:15      阅读:580      评论:0      收藏:0      [点我收藏+]

标签:rf无法连接webdriver驱动

在保证RF安装环境都是正确安装的前提,今天发现一个问题,就是无论我怎么使用open browser都报错,提示无法连接webdriver,网上有很多人都说是下载的webdriver版本不匹配,我也尝试去下载了最新版本,还是无法解决,最后访问了国外的一个网站,https://stackoverflow.com/

解决了这个问题

原因是本机127.0.0.1  与localhost  不匹配

你可以在命令行中输入:drivers

点击/etc/hosts/查看

# Additionally, comments (such as these) may be inserted on individual

# lines or following the machine name denoted by a ‘#‘ symbol.

#

# For example:

#

#      102.54.94.97     rhino.acme.com          # source server

#       38.25.63.10     x.acme.com              # x client host


# localhost name resolution is handled within DNS itself.

# 127.0.0.1       localhost

# ::1             localhost


把注释去掉保存

再去尝试在RF中运行,查看能否打开浏览器


使用robotframework无法连接webdriver

标签:rf无法连接webdriver驱动

原文地址:http://12789418.blog.51cto.com/12779418/1949050

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!