这是我的问题:用铬进行硒测试.
我这样做:
ChromeOptions options = new ChromeOptions();
options.setBinary("/Applications/Google/Google Chrome.app");
System.setProperty("webdriver.chrome.driver", "/Users/Blabla/Documents/lib/chrome/chromedriver");
当我做mvn测试时,我收到此错误:
unknown error: cannot find Chrome binary
最佳答案 根据
ChromeDriver Capabilities docs:
Path to the Chrome executable to use (on Mac OS X, this should be the
actual binary, not just the app. e.g., ‘/Applications/Google
Chrome.app/Contents/MacOS/Google Chrome’)
因此,您需要在Finder中找到您的应用程序并执行“显示包内容”