Created
February 10, 2011 23:22
-
-
Save epall/821592 to your computer and use it in GitHub Desktop.
Setting firefox profile preferences with RemoteWebDriver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.openqa.selenium.*; | |
import org.openqa.selenium.remote.*; | |
import org.openqa.selenium.firefox.*; | |
public class CustomFirefoxProfile { | |
public static void main(String[] args) throws Exception { | |
DesiredCapabilities capabillities = new DesiredCapabilities("firefox", "3.6.", Platform.WINDOWS); | |
capabillities.setCapability("job-name", "Fancy Firefox profile"); | |
FirefoxProfile profile = new FirefoxProfile(); | |
profile.setPreference("network.http.phishy-userpass-length", 255); | |
capabillities.setCapability(FirefoxDriver.PROFILE, profile); | |
WebDriver driver = new RemoteWebDriver(new java.net.URL("http://USERNAME:[email protected]:80/wd/hub"), capabillities); | |
driver.quit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment