2016-12-03 51 views
0

我阅读无处不在,这是用来加载现有的配置文件的代码:硒的webdriver 3.0.1不加载Firefox的配置,我选择

ProfilesIni profile = new ProfilesIni(); 
FirefoxProfile ffprofile = profile.getProfile("SELENIUM"); 
WebDriver driver = new FirefoxDriver(ffprofile); 

我创建了这个名字一个配置文件,一切正常。但它一直加载默认硒轮廓。

我使用硒3.0.1与Java和Firefox 50.0.2这是在我的国家的最后一个版本至少。

的为什么发生这种情况的任何想法?谢谢!

回答

0

你应该首先把配置文件的能力。

ProfilesIni profile = new ProfilesIni(); 
FirefoxProfile ffprofile = profile.getProfile("SELENIUM"); 
WebDriver driver = new FirefoxDriver(ffprofile); 

DesiredCapabilities capabilities = DesiredCapabilities.firefox(); 
capabilities.setCapability(FirefoxDriver.PROFILE, profile); 
WebDriver driver = new FirefoxDriver(capabilities); 
相关问题