有没有办法告诉chromedriver (Chrome 中的 webdriver 实现)使用 Canary、Beta 或当前生产的 chrome?
最佳答案
您可以要求 ChromeDriver 在非标准位置使用 Chrome 可执行文件
ChromeOptions options = new ChromeOptions();
options.setBinary("/path/to/other/chrome.exe");
在 Mac OS X 上,这应该是实际的二进制文件,而不仅仅是应用程序。例如,
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
.[通过 chromedriver Capabilities and Switches]
关于selenium-chromedriver - 使用 Chrome Canary 运行 WebDriver?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18499367/