0
点赞
收藏
分享

微信扫一扫

chromedriver(chromedriverexe)


请问如何调用chromedriver.

chrome浏览器win8.1无法启动解决方法如下:

1、切换到桌面,在屏幕左下角的win徽标处右击鼠标,选择“运行”。

2、在运行窗口中输入regedit,回车,打开注册表编辑器。

3、在注册表中的 hkey_classes_root 根键下找到类似 chromehtml.duxgjlxibais6fu2re3blu4ajq(前面的chromehtml相同,后面的一大串字母和数字可能每个人不一样)的子键。

4、展开 chromehtml.duxgjlxibais6fu2re3blu4ajq 子键,找到 shell\open\command 这个节点,点击 command。

5、在右边的 delegateexecute 一项上右击鼠标,选择“删除”,然后关闭注册表窗口。

怎么将chromedriver.exe位置到path环境变量实现

在gem 安装完watir-webdriver后,默认情况下chrome浏览器的支持是没有安装上的。所以如果要使用webdriver测试chrome的话,我们需要手动安装chrome支持。

RequirementsThe ChromeDriver controls the browser using Chrome's automation proxy framework. Consequently, the ChromeDriver is only compatible with Chrome version 12.0.712.0 or newer.

从官方文档上可以看出,chrome driver只支持chrome12.0712以上的版本。

万事俱备后,首先下载chrome driver将下载好的chromedriver.exe放在环境变量所配置的文件夹中。

使用下面的代码测试chrome driver是否安装完成:

#使用watir-webdriver语法

#安装成功后则可以启动chrome并打开腾讯首页

@browser = Watir::Browser.new :chrome

@browser.goto 'www.qq.com'

举报

相关推荐

0 条评论