-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed as not planned
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended
Description
What happened?
Current setup: We are adding new nodes to the hub and want to add the custom capabilities to the node so that automation engineers can hit those nodes.
I have followed the this documentation: https://www.selenium.dev/documentation/grid/configuration/toml_options/#setting-custom-capabilities-for-matching-specific-nodes
When I am trying to perform tests with the custom capabilities my tests are not hitting the expected node (Node 1), instead it is hitting node 2
Tried couple of attempts.
Node 1: Toml file
[node]
detect-drivers = true
[[node.driver-configuration]]
display-name = "chrome"
stereotype = '{"browserName": "chrome", "browserVersion": "130.0.1", "networkname:applicationName": "dev_v4", "nodename:applicationName": "cust_v4" }'
max-sessions = 5Node 2: Toml file
[node]
detect-drivers = true
[[node.driver-configuration]]
display-name = "chrome"
stereotype = '{"browserName": "chrome", "networkname:applicationName":"dev_v3", "nodename:applicationName":"cust_v3" }'
max-sessions = 5I am calling the Load chrome driver as below
private void LoadChromeDriver()
{
var GridServer = Environment.GetEnvironmentVariable("Unum_Remote_seleniumGridServer");
if (string.IsNullOrEmpty(GridServer))
{
GridServer = ConfigurationManager.AppSettings.seleniumGridServer.ToString();
}
if (ConfigurationManager.AppSettings.REMOTE == "true")
{
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddArgument("--start-maximized");
chromeOptions.AddArgument("--window-size=1920,1080");
chromeOptions.AddArgument("disable-dev-shm-usage");
chromeOptions.AddArgument("lang=en-GB");
chromeOptions.AddArgument("--disable-gpu");
chromeOptions.AddArgument("--incognito");
chromeOptions.AddArgument("--disable-web-security");
chromeOptions.AddAdditionalOption("gsg:customcap", true);
chromeOptions.AddAdditionalOption("networkname:applicationName", "dev_v4");
chromeOptions.AddAdditionalOption("nodename:applicationName", "cust_v4");
Driver = new RemoteWebDriver(new Uri(GridServer), chromeOptions.ToCapabilities(), TimeSpan.FromSeconds(120));
_objectContainer.RegisterInstanceAs(Driver);
Driver.Manage().Window.Maximize();
}
else
{
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.AddArgument("--start-maximized");
chromeOptions.AddArgument("--window-size=1920,1080");
chromeOptions.AddArgument("--incognito");
Driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), chromeOptions, TimeSpan.FromMinutes(3));
_objectContainer.RegisterInstanceAs(Driver);
Driver.Manage().Window.Maximize();
}
}How can we reproduce the issue?
If you copy my two toml files onto two different nodes and use my ChromeDriver method you should be able to replicate the issueRelevant log output
No logsOperating System
Windows server 2019 Datacenter
Selenium version
openjdk 11.0.16.1 2022-08-12 LTS
What are the browser(s) and version(s) where you see this issue?
Chrome 130.0.1
What are the browser driver(s) and version(s) where you see this issue?
Chrome Driver 129.6668.89
Are you using Selenium Grid?
Selenium grid 4..24.0
Metadata
Metadata
Assignees
Labels
A-needs-triagingA Selenium member will evaluate this soon!A Selenium member will evaluate this soon!I-defectSomething is not working as intendedSomething is not working as intended