如何在远程webdriver/grid配置中的节点端设置firefox配置文件

Som*_*Som 12 selenium selenium-webdriver remotewebdriver selenium-grid2

始终建议在DesiredCapabilities中设置firefox配置文件,并将其传递到集线器正在运行的线路.如下

DesiredCapabilities caps = DesiredCapabilities.firefox();

    FirefoxProfile profile=new FirefoxProfile(new File("Local Path to firefox profile folder"));
    caps.setCapability(FirefoxDriver.PROFILE, profile);

URL url = new URL("http://localhost:4444/wd/hub");      
WebDriver driver= new RemoteWebDriver(url,caps );
Run Code Online (Sandbox Code Playgroud)

但是,对于每个硒测试案例,将大量的87-90 mb配置文件信息通过http发送到集线器,从而减慢了测试用例的执行速度.

我尝试"Dwebdriver.firefox.profile=E:\\Firefox_Profile_Location":"",在json节点配置文件中使用属性配置网格节点,如下所示.

{
"configuration":
{
.//Other Settings
.//Other Settings
.//Other Settings
"Dwebdriver.firefox.profile=E:\\Firefox_Profile_Location":"",
"maxSession":7,
"registerCycle":5000,
"register":true
},
"capabilities":
[

{"browserName":"firefox",
"seleniumProtocol":"WebDriver",
"maxInstances":5,
"platform":"VISTA"
}
]
}
Run Code Online (Sandbox Code Playgroud)

但运行上述配置会导致错误.

WebDriverException:未找到系统属性"webdriver.firefox.profile"中命名的Firefox配置文件"E:\ Firefox_Profile_Location"

高级感谢有关如何从节点端配置firefox配置文件的任何帮助.

use*_*289 3

我认为你必须使用 Firefox 配置文件名称而不是位置。

"webdriver.firefox.profile":"default"
Run Code Online (Sandbox Code Playgroud)

看看这个这个还有这个

如果您想知道如何创建个人资料,请遵循