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"));
}