如何使用chromedriver测试多个版本的Google chrome? [英] How to test multiple version of google chrome using chromedriver?

查看:622
本文介绍了如何使用chromedriver测试多个版本的Google chrome?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Java的硒Web驱动程序,然后如何使用chrome驱动程序测试其较低版本的Google chrome

selenium web-driver with java then how to use chrome driver for test their lower version of Google chrome

推荐答案

来自官方 Wiki页面:

覆盖Chrome二进制位置

您可以通过传递"chrome.binary"功能来指定Chrome二进制文件的位置,例如在Debian上安装了典型的Chromium:

You can specify the location of the Chrome binary by passing the "chrome.binary" capability, e.g. with a typical Chromium install on Debian:

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.binary", "/usr/lib/chromium-browser/chromium-browser");
WebDriver driver = new ChromeDriver(capabilities);

我建议您尝试这种方法-告诉较低版本的二进制文件在哪里,然后启动ChromeDriver.从未尝试过,但我认为它可能有用

I suggest you try this approach - tell where the binary of lower version is and start ChromeDriver. Never tried it, but I think it might work

这篇关于如何使用chromedriver测试多个版本的Google chrome?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆