Selenium could not start a browser session.
Dear forumers,
I had setup teamcity on ubuntu server with desktop installed. When i executed the test, I get the following error:
org.openqa.selenium.SessionNotCreatedException:
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'qa-automation-jenkins',
What could be the reason it is failed?
@BeforeMethod
public void openPage() {
Configuration.timeout = 60000;
Configuration.pageLoadStrategy = "none";
Configuration.baseUrl = "https";
Configuration.browserCapabilities = new ChromeOptions().addArguments("--no-sandbox");
Configuration.browserCapabilities = new ChromeOptions().addArguments("--disable-dev-shm-usage");
Configuration.browserCapabilities = new ChromeOptions().addArguments("--headless");
open("http");
}
Please sign in to leave a comment.
Is it related to chromedriver version not matching with the chrome browser?
Hello Nicholas,
It might be related to the chrome driver being outdated. Could you please try to update it to the latest version?
https://sites.google.com/chromium.org/driver/downloads
Thank you,
Guilherme