У меня не получилось получить разрешение 1920 на 1080 при запуске в режиме headless chrome на selenide
Код
public void beforeTest() {
SelenideLogger.addListener("allure", new AllureSelenide());
Configuration.browser = "chrome";
Configuration.timeout = 10000;
Configuration.pageLoadStrategy="normal";
Configuration.browserSize = "1920x1080";
Configuration.startMaximized = true;
Configuration.browserPosition = "100x100";
Configuration.fileDownload = FileDownloadMode.PROXY;
Configuration.proxyEnabled = true;
Configuration.browserBinary = Settings.BROWSERPATH;
Configuration.headless = true;
System.setProperty("webdriver.chrome.driver", Settings.WEBDRIVERPATH);
Логи и ошибка вот такая …
авг 22, 2019 5:04:04 PM com.codeborne.selenide.drivercommands.LazyDriver getAndCheckWebDriver
INFO: No webdriver is bound to current thread: 1 - let’s create a new webdriver
авг 22, 2019 5:04:06 PM com.codeborne.selenide.webdriver.ChromeDriverFactory createChromeOptions
INFO: Using browser binary: C:\Users\I\AppData\Local\Google\Chrome\Application\chrome.exe
Starting ChromeDriver 2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387) on port 7920
Only local connections are allowed.
авг 22, 2019 5:04:08 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
авг 22, 2019 5:04:09 PM com.codeborne.selenide.webdriver.WebDriverFactory logBrowserVersion
INFO: BrowserName=chrome Version=71.0.3578.98 Platform=XP
авг 22, 2019 5:04:09 PM com.codeborne.selenide.webdriver.WebDriverFactory createWebDriver
INFO: Selenide v. 5.2.8
авг 22, 2019 5:04:09 PM com.codeborne.selenide.webdriver.WebDriverFactory logSeleniumInfo
INFO: Selenium WebDriver v. 3.141.59 build time: 2018-11-14T08:17:03
авг 22, 2019 5:04:09 PM com.codeborne.selenide.drivercommands.CreateDriverCommand createDriver
INFO: Create webdriver in current thread 1: ChromeDriver -> ChromeDriver: chrome on XP (2f0f9693cc5926fc82861c2efec1d9b7)
авг 22, 2019 5:04:27 PM com.codeborne.selenide.impl.ScreenShotLaboratory ensureFolderExists
INFO: Creating folder: build\reports\tests
авг 22, 2019 5:05:24 PM com.codeborne.selenide.drivercommands.CloseDriverCommand run
INFO: Close webdriver: 1 -> ChromeDriver: chrome on XP (2f0f9693cc5926fc82861c2efec1d9b7)
авг 22, 2019 5:05:24 PM com.codeborne.selenide.drivercommands.CloseDriverCommand run
INFO: Close proxy server: 1 -> Selenide proxy server: 63030
авг 22, 2019 5:05:24 PM com.codeborne.selenide.drivercommands.CloseBrowser run
INFO: Trying to close the browser ChromeDriver …
авг 22, 2019 5:05:25 PM com.codeborne.selenide.drivercommands.CloseBrowser run
INFO: Trying to shutdown Selenide proxy server: 63030 …
авг 22, 2019 5:05:25 PM com.codeborne.selenide.drivercommands.CloseDriverCommand run
INFO: Closed webdriver 1 in 578 ms
[ERROR] Tests run: 7, Failures: 6, Errors: 0, Skipped: 0, Time elapsed: 81.451 s <<< FAILURE! - in TestSuite
[ERROR] T628(ru.TestUI.Test1) Time elapsed: 15.115 s <<< FAILURE!
com.codeborne.selenide.ex.ElementIsNotClickableException:
WebDriverException: unknown error: Element … is not clickable at point (343, 263). Other element would receive the click:
и прочие ошибки типа - будет клик на другой элемент и скриншоты показывают низкое разрешение экрана в условиях которого элементы веб-приложения наезжают друг на друга
В обычном режиме(не headless) работает идеально
Версии ОС и софта следующие …
selenide 5.2.8
chrome 71