看一下Selenium 2.0(alpha 7)源代碼,似乎可以通過功能API設置RemoteWebDriver的Ff配置文件。然而,人們不知道如何去做。如何用RemoteWebDriver表示Firefox配置文件
任何想法?
看一下Selenium 2.0(alpha 7)源代碼,似乎可以通過功能API設置RemoteWebDriver的Ff配置文件。然而,人們不知道如何去做。如何用RemoteWebDriver表示Firefox配置文件
任何想法?
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節點的特定Firefox配置文件,只需設置 webdriver.firefox.profile屬性:
Java的罐子硒的服務器獨立-2.37.0的.jar -Dwebdriver.firefox.profile =我的簡檔-hub http://mydomain.com:4444/grid/register
http://automatictester.wordpress.com/2013/04/07/selenium-running-custom-firefox-profile/