码迷,mamicode.com
首页 > 其他好文 > 详细

如何在老版本的Chrome 浏览器上使用selenium

时间:2015-05-29 17:42:02      阅读:96      评论:0      收藏:0      [点我收藏+]

标签:

由于Chrome Driver 只兼容Chrome  浏览器12.0.712.0 和之后的新版本,会因此如果要在老版本的Chrome  浏览器上使用Selenium, 则只能使用 SeleniumRC来完成任务,示例代码:

URL seleniumRC = new URL("http://localhost:4444");

URL testWebLink = new URL("http://www.google.com");

CommandExecutor executor = new SeleneseCommandExecutor(seleniumRC, testWebLink, DesiredCapabilities.chrome());

WebDriver driver = new RemoteWebDriver(executor);

如何在老版本的Chrome 浏览器上使用selenium

标签:

原文地址:http://www.cnblogs.com/feifeidxl/p/4538641.html

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