2010-12-07 1 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); 
2

Вы можете присвоить каждому Селен сетки 2 узла конкретного профиля светлячок, просто установите webdriver.firefox.profile свойство:

ява -jar Селен-сервера автономный-2.37.0 .jar -Dwebdriver.firefox.profile = мой профиль--ролевой узел -hub http://mydomain.com:4444/grid/register

  • значение webdriver.firefox.profile должно быть имя профиля светлячок, а не местоположение или имя папки

http://automatictester.wordpress.com/2013/04/07/selenium-running-custom-firefox-profile/