如何安装webdriver chrome浏览器支持

如何安装webdriver chrome浏览器支持

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

Requirements The 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' 
posted @ 2011-10-29 10:15  乙醇  阅读(2733)  评论(0编辑  收藏  举报

友情链接 虫师的blog  测试教程网  重定向科技  省略