При запуске тестов использую кастомный лисонер
public class SelenoidSetup implements BeforeAllCallback {
@Override
public void beforeAll(final ExtensionContext context) {
ChromeOptions options = new ChromeOptions();
options.setCapability("selenoid:options", new HashMap<String, Object>() {{
/* How to add test badge */
put("name", "Test badge...");
/* How to set session timeout */
put("sessionTimeout", "15m");
/* How to set timezone */
put("env", new ArrayList<String>() {{
add("TZ=UTC");
}});
/* How to add "trash" button */
put("labels", new HashMap<String, Object>() {{
put("manual", "true");
}});
put("enableVNC", true);
/* How to enable video recording */
put("enableVideo", false);
}});
Configuration.browserCapabilities = options;
Configuration.baseUrl = "localhost:4444/";
Configuration.remote = "http://localhost:4444/wd/hub";
}
}
Сам класс с тестами пометил аннотацией @ExtendWith(SelenoidSetup.class).
Ошибка:
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: Chrome failed to start: exited normally.
(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)