Selenium 3.0.1 Chrome节点配置 [英] Selenium 3.0.1 Chrome Node configuration
问题描述
Selenium 3.0.1更新通过Json Config File调用节点时引发错误.请从Json文件中找到以下详细信息.
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"
}
}
错误-Config的Json错误:遇到专用的节点配置文件.请更新文件以使用硒3
Error - Error with Json of Config : Depricated node config file encountered. please update the file to work with selenium 3
推荐答案
我确定您已经解决了这个问题,但对于将来的访问者:
I'm sure you've solved this, but for future visitors:
在Selenium 3中,configuration
对象已被展平,如下所示:
In Selenium 3, the configuration
object has been flattened, as stated here: https://github.com/SeleniumHQ/selenium/wiki/Grid2#configuring-the-nodes-by-json
因此,您只需要删除configuration
.像这样:
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"
}
{
"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"
}
这篇关于Selenium 3.0.1 Chrome节点配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!