2010-12-07 4 views

Répondre

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

Vous pouvez attribuer à chaque grille de Sélénium 2 nœud un profil spécifique de Firefox, vient de mettre la webdriver.firefox.profile propriété:

java jar sélénium-serveur-2.37.0 autonome .jar -Dwebdriver.firefox.profile = mon profil noeud -role -hub http://mydomain.com:4444/grid/register

  • la valeur du webdriver.firefox.profile doit être le nom du profil firefox, pas l'emplacement ou le nom du dossier

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

Questions connexes