use of org.seleniumhq.selenium.fluent.FluentWebDriver in project selenium_java by sergueik.
the class AngularAndWebDriverTest method basic_actions.
/*
Ported from protractor/spec/basic/action_spec.js
*/
@Test(enabled = true)
public void basic_actions() {
FluentWebDriver fwd = new FluentWebDriver(driver);
driver.get("http://localhost:8080/index.html#/form");
ngWebDriver.waitForAngularRequestsToFinish();
FluentWebElement sliderBar = fwd.input(By.name("points"));
sliderBar.getAttribute("value").shouldBe("1");
new Actions(driver).dragAndDropBy(sliderBar.getWebElement(), 400, 20).build().perform();
sliderBar.getAttribute("value").shouldBe("10");
}
use of org.seleniumhq.selenium.fluent.FluentWebDriver in project selenium_java by sergueik.
the class AngularAndWebDriverTest method basic_elements_should_allow_using_repeater_locator_within_map.
/*
Ported from protractor/spec/basic/elements_spec.js
TODO - many more specs in here
*/
@SuppressWarnings("serial")
@Test(enabled = false)
public void basic_elements_should_allow_using_repeater_locator_within_map() {
FluentWebDriver fwd = new FluentWebDriver(driver);
driver.get("http://localhost:8080/index.html#/repeater");
Map<String, String> expected = new HashMap<String, String>() {
{
put("M", "Monday");
put("T", "Tuesday");
put("W", "Wednesday");
put("Th", "Thursday");
put("F", "Friday");
}
};
Map<String, String> days = fwd.lis(ByAngular.repeater("allinfo in days")).map(new FluentWebElementMap<String, String>() {
public void map(FluentWebElement elem, int ix) {
put(elem.element(ByAngular.binding("allinfo.initial")).getText().toString(), elem.element(ByAngular.binding("allinfo.name")).getText().toString());
}
});
assertThat(days.entrySet(), equalTo(expected.entrySet()));
}
use of org.seleniumhq.selenium.fluent.FluentWebDriver in project BuildRadiator by BuildRadiator.
the class UrlEditorWebDriverTest method sharedForAllTests.
@BeforeClass
public static void sharedForAllTests() {
// Keep the WebDriver browser window open between tests
ChromeOptions co = new ChromeOptions();
boolean headless = Boolean.parseBoolean(System.getProperty("HEADLESS", "false"));
if (headless) {
co.addArguments("headless");
}
co.addArguments("window-size=1200x800");
DRIVER = new ChromeDriver(co);
FWD = new FluentWebDriver(DRIVER);
}
use of org.seleniumhq.selenium.fluent.FluentWebDriver in project BuildRadiator by BuildRadiator.
the class RadiatorWebDriverTest method sharedForAllTests.
@BeforeClass
public static void sharedForAllTests() {
// Keep the WebDriver browser window open between tests
DRIVER = new ChromeDriver();
FWD = new FluentWebDriver(DRIVER);
}
use of org.seleniumhq.selenium.fluent.FluentWebDriver in project BuildRadiator by BuildRadiator.
the class RadiatorWebDriverTest method sharedForAllTests.
@BeforeClass
public static void sharedForAllTests() {
// Keep the WebDriver browser window open between tests
ChromeOptions co = new ChromeOptions();
boolean headless = Boolean.parseBoolean(System.getProperty("HEADLESS", "false"));
if (headless) {
co.addArguments("headless");
}
co.addArguments("window-size=1200x800");
DRIVER = new ChromeDriver(co);
FWD = new FluentWebDriver(DRIVER);
}
Aggregations