form.submit();
Page page = browser.currentPage();
Assert.assertEquals("Login", page.title());
Assert.assertTrue(page.div("errors").contains("Invalid login!"));
Assert.assertTrue(form.isChecked("remember"));
// ensures that the form remains with the previously typed login
Assert.assertEquals(form.field("login").content(), "invalid_login");