Created
May 19, 2011 11:06
-
-
Save freynaud/980539 to your computer and use it in GitHub Desktop.
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
private static SeleniumServer server; | |
private static int port; | |
@BeforeClass | |
public static void prepare() throws Exception { | |
port = PortProber.findFreePort(); | |
RemoteControlConfiguration config = new RemoteControlConfiguration(); | |
config.setPort(port); | |
server = new SeleniumServer(config); | |
server.boot(); | |
} | |
@Test | |
public void ff() throws MalformedURLException { | |
DesiredCapabilities ff = DesiredCapabilities.firefox(); | |
WebDriver driver = null; | |
try { | |
driver = new RemoteWebDriver(new URL("http://localhost:" + port + "/wd/hub"), ff); | |
driver.get("https://signin.at.paradise.qa.ebay.com/ws/eBayISAPI.dll?SignIn"); | |
Assert.assertEquals("Google", driver.getTitle()); | |
} finally { | |
Reporter.log("driver : " + driver); | |
driver.quit(); | |
} | |
} | |
@AfterClass | |
public static void stop() throws Exception { | |
server.stop(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment