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配置文件的任何帮助.
归档时间: |
|
查看次数: |
2962 次 |
最近记录: |