Reputation: 597
Selenium 3.0.1 update is throwing an error while invokeing the node through Json Config File. Please find the following details from the Json file.
{
"capabilities":
[
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
}
],
"configuration":
{
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
"port": 5559,
"host": ip,
"register": true,
"registerCycle": 5000,
"hubPort": 4445,
"hubHost":ip,
"hub":"http://XX.XX.XX.XX:XXXX/grid/register",
"timeout":600000,
"browserTimeout":600000"
}
}
Error - Error with Json of Config : Depricated node config file encountered. please update the file to work with selenium 3
Upvotes: 2
Views: 4383
Reputation: 1991
I'm sure you've solved this, but for future visitors:
In Selenium 3, the configuration
object has been flattened, as stated here: https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-json
So you just need to remove configuration
. So something like this:
{
"capabilities":
[
{
"browserName": "chrome",
"maxInstances": 5,
"seleniumProtocol": "WebDriver"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
"port": 5559,
"host": ip,
"register": true,
"registerCycle": 5000,
"hubPort": 4445,
"hubHost":ip,
"hub":"http://XX.XX.XX.XX:XXXX/grid/register",
"timeout":600000,
"browserTimeout":600000"
}
Upvotes: 3
Reputation: 14736
If you look at the complete error message (which you haven't included here)
Exception in thread "main" org.openqa.grid.common.exception.GridConfigurationException: Error with the JSON of the config : Deprecated -nodeConfig file encountered. Please update the file to work with Selenium 3. See https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-json for more details.
at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:311)
at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:287)
at org.openqa.grid.selenium.GridLauncherV3$3.setConfiguration(GridLauncherV3.java:261)
at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:147)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:73)
Caused by: org.openqa.grid.common.exception.GridConfigurationException: Deprecated -nodeConfig file encountered. Please update the file to work with Selenium 3. See https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-json for more details.
at org.openqa.grid.internal.utils.configuration.GridNodeConfiguration.loadFromJSON(GridNodeConfiguration.java:303)
... 4 more
you would realise that the error message also contains info on what you need to do to fix the problem.
Looks like they changed the file format of the node configuration file with 3.0.
Please refer here for a new sample file and here for more information.
Upvotes: 0