Pau*_*ers 4 selenium webdriver selenium-webdriver
查看Selenium 2.0(alpha 7)源代码,似乎可以通过功能API设置RemoteWebDriver的Ff配置文件.但目前尚不清楚如何做到这一点.
有任何想法吗?
FirefoxProfile profile = new FirefoxProfile();
// OR
// FirefoxProfile profile = new FirefoxProfile(new File(...));
// Init your profile
// OR
// If you created the profile by providing a path to it,
// the path should refer to the one on the host of the WD server
DesiredCapabilities caps = DesiredCapabilities.firefox();
caps.setCapability(FirefoxDriver.PROFILE, profile);
WebDriver driver = new RemoteWebDriver(new URL("http://<....>:4444/wd/hub"), caps);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3135 次 |
| 最近记录: |