You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Im using selenium 4.26 with openJdk 11.0.2. I have a selenium grid with 10 machines. When i try to run the test with specific browser version, the tests goes in queue and fails.
Refer below grid ui image where thetest goes in queue.
How can we reproduce the issue?
public RemoteWebDriver startGrid(String browser) throws Exception {
log.info("Going to setup grid...");
int resolutionWidth;
int resolutionHeight;
String[] resolution = ReadPropertyFile.getInstance().getPropertyValue("resolution").split(",");
String headlessFlag = ReadPropertyFile.getInstance().getPropertyValue("headlessFlag");
resolutionWidth = Integer.parseInt(resolution[0]);
resolutionHeight = Integer.parseInt(resolution[1]);
MutableCapabilities cap = new MutableCapabilities();
cap.setCapability("platformName", "ANY");if (browser.equalsIgnoreCase(BrowserConstants.CHROME_BROWSER)) {
cap.setCapability("browserName", BrowserConstants.CHROME_BROWSER);
ChromeOptions options = new ChromeOptions();
**options.setBrowserVersion(ReadPropertyFile.getInstance()
.getPropertyValue("browserVersion"));**if (headlessFlag.equalsIgnoreCase("true")) {
options.addArguments("--headless=new");
}
options.addArguments("--incognito");
Map<String, Object> profile = new HashMap<>();
Map<String, Object> prefs = new HashMap<>();
prefs.put("profile", profile);
prefs.put("credentials_enable_service", false);
prefs.put("profile.password_manager_enabled", false);
options.setExperimentalOption("prefs", prefs);
options.addArguments("--ignore-ssl-errors=yes");
options.addArguments("--ignore-certificate-errors");
options.addArguments("--disable-search-engine-choice-screen");
options.addArguments("--disable-features=OptimizationGuideModelDownloading,OptimizationHintsFetching,OptimizationTargetPrediction,OptimizationHints");
options.setExperimentalOption("excludeSwitches", Collections.singletonList("enable-automation"));
options.setExperimentalOption("useAutomationExtension", false);
options.setCapability("se:name", getTestcaseName());
options = options.merge(cap);
log.info("Going to get Driver instance from thread local class...");RemoteCustomDriver.getInstance().setRemotedriver(new RemoteWebDriver(new URL(getHubUrl()), options));
SessionId sessionId = (RemoteCustomDriver.getInstance().getRemotedriver()).getSessionId();
nodeIp = getNodeIp(sessionId);RemoteCustomDriver.getInstance().getRemotedriver().manage().deleteAllCookies();
RemoteCustomDriver.getInstance().getRemotedriver().navigate().to(getUrl());
} elseif (browser.equalsIgnoreCase(BrowserConstants.FIREFOX_BROWSER)) {
cap.setCapability("browserName", BrowserConstants.FIREFOX_BROWSER);
FirefoxOptions options = new FirefoxOptions();
**options.setBrowserVersion(ReadPropertyFile.getInstance()
.getPropertyValue("browserVersion"));**if (headlessFlag.equalsIgnoreCase("true")) {
options.addArguments("--headless=new");
}
options.addArguments("-private");
options.merge(cap);
log.info("Going to get Driver instance from thread local class...");RemoteCustomDriver.getInstance().setRemotedriver(new RemoteWebDriver(new URL(getHubUrl()), options));
RemoteCustomDriver.getInstance().getRemotedriver().manage().deleteAllCookies();
RemoteCustomDriver.getInstance().getRemotedriver().navigate().to(getUrl());
} elseif (browser.equalsIgnoreCase(BrowserConstants.EDGE_BROWSER)) {
cap.setCapability("browserName", BrowserConstants.EDGE_BROWSER);
EdgeOptions options = new EdgeOptions();
**options.setBrowserVersion(ReadPropertyFile.getInstance()
.getPropertyValue("browserVersion"));**if (headlessFlag.equalsIgnoreCase("true")) {
options.addArguments("--headless=new");
}
options.addArguments("--ignore-ssl-errors=yes");
options.addArguments("--ignore-certificate-errors");
options.addArguments("--disable-search-engine-choice-screen");
options.addArguments("--disable-features=OptimizationGuideModelDownloading,OptimizationHintsFetching,OptimizationTargetPrediction,OptimizationHints");
options.merge(cap);
log.info("Going to get Driver instance from thread local class...");RemoteCustomDriver.getInstance().setRemotedriver(new RemoteWebDriver(new URL(getHubUrl()), options));
SessionId sessionId = (RemoteCustomDriver.getInstance().getRemotedriver()).getSessionId();
nodeIp = getNodeIp(sessionId);RemoteCustomDriver.getInstance().getRemotedriver().manage().deleteAllCookies();
RemoteCustomDriver.getInstance().getRemotedriver().navigate().to(getUrl());
}
RemoteCustomDriver.getInstance().getRemotedriver().navigate().refresh();
RemoteCustomDriver.getInstance().getRemotedriver().manage().window()
.setSize(new Dimension(resolutionWidth, resolutionHeight));RemoteCustomDriver.getInstance().getRemotedriver().manage().timeouts().pageLoadTimeout(Duration.ofSeconds(30));
RemoteCustomDriver.getInstance().getRemotedriver().manage().timeouts().scriptTimeout(Duration.ofMinutes(2));
RemoteCustomDriver.getInstance().getRemotedriver().manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
String version = RemoteCustomDriver.getInstance().getRemotedriver().getCapabilities().toString();
System.setProperty("Browser/Driver Versions", version);returnRemoteCustomDriver.getInstance().getRemotedriver();
}
Below are the commands that i'm using to start the server.**For Hub :** java -jar selenium-server-4.26.0.jar hub --session-request-timeout 1300 --log-level "info" --log C:\Selenium4.23GridHub\hublog.log**For Node :** java -jar selenium-server-4.26.0.jar node --session-timeout 1000 --max-sessions 4 --selenium-manager true --detect-drivers true --publish-events tcp://10.50.12.39:4442 --subscribe-events tcp://10.50.12.39:4443 --log-level "info" --log C:\Selenium4.23GridNode\nodelog.log
Relevant log output
Session Not Created due to: 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: 'PRONVDC048', ip: '192.168.64.145'
Operating System
Windows 10
Selenium version
4.26
What are the browser(s) and version(s) where you see this issue?
130
What are the browser driver(s) and version(s) where you see this issue?
130
Are you using Selenium Grid?
4.26
The text was updated successfully, but these errors were encountered:
@arunkumarr88, thank you for creating this issue. We will troubleshoot it as soon as we can.
Info for maintainers
Triage this issue by using labels.
If information is missing, add a helpful comment and then I-issue-template label.
If the issue is a question, add the I-question label.
If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable G-* label, and it will provide the correct link and auto-close the
issue.
After troubleshooting the issue, please add the R-awaiting answer label.
What happened?
Im using selenium 4.26 with openJdk 11.0.2. I have a selenium grid with 10 machines. When i try to run the test with specific browser version, the tests goes in queue and fails.
Refer below grid ui image where thetest goes in queue.
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.26
What are the browser(s) and version(s) where you see this issue?
130
What are the browser driver(s) and version(s) where you see this issue?
130
Are you using Selenium Grid?
4.26
The text was updated successfully, but these errors were encountered: