Всем привет! Переделал инициализацию WebDriver через selenide
Configuration.remote = "http://" + HOST_HUB + ":4444/wd/hub";
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName("chrome");
capabilities.setVersion("88.0");
capabilities.setCapability("enableVNC", true);
capabilities.setCapability("enableVideo", false);
capabilities.setCapability("acceptInsecureCerts", true);
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
capabilities.setCapability("goog:loggingPrefs", logPrefs);
Configuration.browserCapabilities = capabilities;
Configuration.browserSize = "1920x1080";
Configuration.browserPosition = "2x2";
Configuration.fileDownload = FileDownloadMode.FOLDER;
Configuration.screenshots = false;
Теперь получаю в конце каждого прогона тестов получаю такое сообщение
Exception in thread "Webdrivers killer thread" org.openqa.selenium.WebDriverException: An unknown error has occurred
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'CentOSBuilder', ip: '10.10.199.155', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-1160.el7.x86_64', java.version: '1.8.0_292'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities {acceptInsecureCerts: true, browserName: chrome, browserVersion: 88.0.4324.96, chrome: {chromedriverVersion: 88.0.4324.27 (6347fe8bf1e48..., userDataDir: /tmp/.com.google.Chrome.ZfLlbW}, goog:chromeOptions: {debuggerAddress: localhost:43887}, javascriptEnabled: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: LINUX, platformName: LINUX, proxy: Proxy(), setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
Session ID: 6d706983b2512421e7927ff9fd8f0072
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:609)
at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:452)
at com.codeborne.selenide.impl.UnusedWebdriversCleanupThread.closeWebDriver(UnusedWebdriversCleanupThread.java:63)
at com.codeborne.selenide.impl.UnusedWebdriversCleanupThread.closeUnusedWebdrivers(UnusedWebdriversCleanupThread.java:50)
at com.codeborne.selenide.impl.UnusedWebdriversCleanupThread.run(UnusedWebdriversCleanupThread.java:35)
Когда инициализировал WebDriver через RemoteWebDriver такой ошибки не возникало
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setBrowserName("chrome");
capabilities.setVersion("88.0");
capabilities.setCapability("enableVNC", true);
capabilities.setCapability("enableVideo", false);
capabilities.setCapability("acceptInsecureCerts", true);
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
capabilities.setCapability("goog:loggingPrefs", logPrefs);
try {
driver = new RemoteWebDriver(URI.create("http://" + HOST_HUB + ":4444/wd/hub").toURL(), capabilities);
} catch (MalformedURLException e) {
e.printStackTrace();
}
driver.manage().window().setSize(new Dimension(1920, 1080));
driver.manage().window().setPosition(new Point(2,2));
driver.setFileDetector(new LocalFileDetector());
WebDriverRunner.setWebDriver(driver);
Версия selenide - 5.20.4
Использую JUnit 5
Как можно убрать данную ошибку? Спасибо)