2010-12-07 74 views

回答

9
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); 
相關問題