Package br.com.caelum.seleniumdsl

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


        .type("myLogin");
    form.field("password")
        .type("myPassword");
    form.check("remember");

    form.submit();

    // logged successfuly
    Assert.assertEquals("Main Page", browser.currentPage()
        .title());
  }
View Full Code Here


    form.field("login")
        .type("invalid_login");
    form.field("password")
        .type("invalid_password");

    form.submit();

    Page page = browser.currentPage();

    Assert.assertEquals("Login", page.title());
    Assert.assertTrue(page.div("errors")
View Full Code Here

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

    form.submit();

    // logged successfuly
    Assert.assertEquals("Main Page", browser.currentPage().title());
  }
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();

    Assert.assertEquals("Login", page.title());
    Assert.assertTrue(page.div("errors").contains("Invalid login!"));
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.