我正在尝试使用Chrome Headless
Selenium Webdriver 上的模式来测试具有不同参数的脚本
NoSuchElementException
- 当通过 xpath 查找时
chrome not reachable
- webdriverexception
chrome failed to start
-
ChromeOptions options = new ChromeOptions();
options.addArguments("--headless","--disable-gpu");
webDriver = new ChromeDriver(options);
这是初始化。
xpath 没有问题,因为它在正常模式下工作。
铬版本 60
硒 3.5.0
铬驱动程序 2.32