use of org.openqa.selenium.firefox.FirefoxDriver in project ghostdriver by detro.
the class BaseTest method prepareDriver.
@Before
public void prepareDriver() throws Exception {
// Which driver to use? (default "phantomjs")
String driver = sConfig.getProperty("driver", DRIVER_PHANTOMJS);
// Start appropriate Driver
if (isUrl(driver)) {
sCaps.setBrowserName("phantomjs");
mDriver = new RemoteWebDriver(new URL(driver), sCaps);
} else if (driver.equals(DRIVER_FIREFOX)) {
mDriver = new FirefoxDriver(sCaps);
} else if (driver.equals(DRIVER_CHROME)) {
mDriver = new ChromeDriver(sCaps);
} else if (driver.equals(DRIVER_PHANTOMJS)) {
mDriver = new PhantomJSDriver(sCaps);
}
}
use of org.openqa.selenium.firefox.FirefoxDriver in project violations-plugin by jenkinsci.
the class ConfigurationWebTest method before.
@BeforeClass
public static void before() throws Exception {
webDriver = new FirefoxDriver();
waitForJenkinsToStart();
}
use of org.openqa.selenium.firefox.FirefoxDriver in project head by mifos.
the class SeleniumTest method testSearchMifosOnGoogle.
@Test
public void testSearchMifosOnGoogle() throws Exception {
WebDriver wd = new FirefoxDriver();
try {
wd.get("http://www.google.com");
WebElement element = wd.findElement(By.name("q"));
element.sendKeys("Mifos");
element.submit();
} finally {
wd.quit();
}
}
use of org.openqa.selenium.firefox.FirefoxDriver in project head by mifos.
the class WorkspaceServerLauncherTest method testLogin.
@Test
public void testLogin() throws Exception {
WebDriver wd = new FirefoxDriver();
wd.get(getAppURL());
wd.findElement(By.id(UID)).sendKeys("mifos");
wd.findElement(By.id(PWD)).sendKeys("testmifos");
wd.findElement(By.id(BTN)).click();
Assert.assertTrue(wd.getPageSource().contains("Mifos"));
Assert.assertTrue(wd.getPageSource().contains("Home"));
Assert.assertTrue(wd.getPageSource().contains("Search"));
wd.quit();
}
use of org.openqa.selenium.firefox.FirefoxDriver in project head by mifos.
the class MifosPackagedWARBasicTest method testPackagedWARStartup.
@Test
public void testPackagedWARStartup() throws Exception {
WARServerLauncher serverLauncher = mifosLauncher(7077);
serverLauncher.startServer();
WebDriver wd = new FirefoxDriver();
wd.get("http://localhost:7077/mifos/");
wd.findElement(By.id("login.input.username")).sendKeys("mifos");
wd.findElement(By.id("login.input.password")).sendKeys("testmifos");
wd.findElement(By.id("login.button.login")).click();
Assert.assertTrue(wd.getPageSource().contains("Mifos"));
Assert.assertTrue(wd.getPageSource().contains("Home"));
Assert.assertTrue(wd.getPageSource().contains("Search"));
wd.quit();
serverLauncher.stopServer();
serverLauncher = null;
}
Aggregations