use of org.openqa.selenium.WebDriver 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;
}
use of org.openqa.selenium.WebDriver in project rstudio by rstudio.
the class ConsoleTestUtils method waitForConsoleContainsText.
public static void waitForConsoleContainsText(WebDriver driver, final String text) {
final WebElement output = driver.findElement(By.id(ElementIds.getElementId(ElementIds.CONSOLE_OUTPUT)));
(new WebDriverWait(driver, 5)).until(new ExpectedCondition<Boolean>() {
public Boolean apply(WebDriver d) {
String outputText = output.getText();
return outputText.contains(text);
}
});
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class MultiSelect method getSelectLambda.
public Select getSelectLambda(Supplier<By> by) {
Element element = untilFound(by);
new WebDriverWait(this, 3, 100).until((WebDriver driver) -> {
element.click();
return !element.findElements(By.tagName("option")).isEmpty();
});
return new Select(element);
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class MultiSelect method getSelect.
public Select getSelect(Supplier<By> by) {
final Element element = untilFound(by);
new WebDriverWait(this, 3, 100).until((Predicate<WebDriver>) driver -> {
element.click();
return !element.findElements(By.tagName("option")).isEmpty();
});
return new Select(element);
}
use of org.openqa.selenium.WebDriver in project java.webdriver by sayems.
the class ActionBuildPerform method main.
public static void main(String... args) {
WebDriver driver = new FirefoxDriver();
driver.get("file://C:/selectable.html");
WebElement one = driver.findElement(By.name("one"));
WebElement three = driver.findElement(By.name("three"));
WebElement five = driver.findElement(By.name("five"));
// Add all the actions into the Actions builder.
Actions builder = new Actions(driver);
builder.keyDown(Keys.CONTROL).click(one).click(three).click(five).keyUp(Keys.CONTROL);
// Generate the composite action.
Action compositeAction = builder.build();
// Perform the composite action.
compositeAction.perform();
}
Aggregations