-
-
Save rameshbaskar/784419ff81f34a0c3e1e to your computer and use it in GitHub Desktop.
Replacing Firefox driver to PhantomJS driver
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
// Current Implementation - Using FirefoxDriver | |
@Before | |
public static void before() { | |
driver = new FirefoxDriver(); | |
admin = new AdminApi(); | |
user = new UserApi(driver); | |
screen = new ScreenApi(driver); | |
} | |
// New Implementation - Using PhantomJSDriver | |
@Before | |
public static void before() { | |
DesiredCapabilities caps = new DesiredCapabilities(); | |
caps.setJavascriptEnabled(true); | |
caps.setCapability("takesScreenshot", true); | |
driver = new PhantomJSDriver(caps); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment