【发布时间】:2018-05-24 01:44:40
【问题描述】:
我在使用 Selenium java 和 Windows 操作系统在 chrome headless 上运行脚本时遇到以下问题。 URL 未打开我的应用程序 URL 的页面标题为 null ..chrome 驱动程序版本 2.33,chrome 浏览器 62 ..我正在使用以下代码
System.setProperty("webdriver.chrome.driver", chromedriver.exe);
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--headless");
chromeOptions.addArguments("window-sized1200,600");
ChromeDriver driver = new ChromeDriver(chromeOptions);
driver.get("app url");
System.out.println(driver.getTitle)
是否因为应用程序 URL 不支持无头模式..没有任何异常..
【问题讨论】:
标签: java google-chrome selenium headless