Created
March 14, 2014 06:45
-
-
Save xkr47/9543086 to your computer and use it in GitHub Desktop.
How to set up webdriver to optionally use alternative DISPLAY setting for browser
This file contains 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
FirefoxBinary firefox = new FirefoxBinary(); | |
// allow user to specify which DISPLAY to use if running e.g. Xephyr | |
String display = System.getProperty("firefoxDisplay"); | |
if (display != null) { | |
firefox.setEnvironmentProperty("DISPLAY", display); | |
} | |
WebDriver driver = new FirefoxDriver(firefox, null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment