Package br.com.caelum.seleniumdsl

Examples of br.com.caelum.seleniumdsl.Form.field()


    browser.open("/");
    selenium.stop();

    Page currentPage = browser.currentPage();
    Form form = currentPage.form("id");
    Field field = form.field("fieldName");
  }
}
View Full Code Here


    browser.open("/");
    selenium.stop();

    Page currentPage = browser.currentPage();
    Form form = currentPage.form("id");
    Field field = form.field("fieldName");
  }
}
View Full Code Here

  @Test
  public void testLogin() {
    Form form = browser.currentPage()
        .form("form");
    form.field("login")
        .type("myLogin");
    form.field("password")
        .type("myPassword");
    form.check("remember");
View Full Code Here

  public void testLogin() {
    Form form = browser.currentPage()
        .form("form");
    form.field("login")
        .type("myLogin");
    form.field("password")
        .type("myPassword");
    form.check("remember");

    form.submit();
View Full Code Here

  @Test
  public void testInvalidLogin() {
    Form form = browser.currentPage()
        .form("form");
    form.field("login")
        .type("invalid_login");
    form.field("password")
        .type("invalid_password");

    form.submit();
View Full Code Here

  public void testInvalidLogin() {
    Form form = browser.currentPage()
        .form("form");
    form.field("login")
        .type("invalid_login");
    form.field("password")
        .type("invalid_password");

    form.submit();

    Page page = browser.currentPage();
View Full Code Here

    Assert.assertTrue(page.div("errors")
        .contains("Invalid login!"));

    Assert.assertTrue(form.isChecked("rememeber"));
    // ensures that the form remains with the previously typed login
    Assert.assertEquals(form.field("login")
        .content(), "invalid_login");
    // or
    Assert.assertTrue(form.field("login")
        .contains("invalid_login"));
  }
View Full Code Here

    Assert.assertTrue(form.isChecked("rememeber"));
    // ensures that the form remains with the previously typed login
    Assert.assertEquals(form.field("login")
        .content(), "invalid_login");
    // or
    Assert.assertTrue(form.field("login")
        .contains("invalid_login"));
  }
}
View Full Code Here

  }

  @Test
  public void testLogin() {
    Form form = browser.currentPage().form("form");
    form.field("login").type("myLogin");
    form.field("password").type("myPassword");
    form.check("remember");

    form.submit();
View Full Code Here

  @Test
  public void testLogin() {
    Form form = browser.currentPage().form("form");
    form.field("login").type("myLogin");
    form.field("password").type("myPassword");
    form.check("remember");

    form.submit();

    // logged successfuly
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.