// Make sure we are signed in
resp = resp.getLinkWith("My Account").click();
// Enter the new data in the form
WebForm form = resp.getForms()[1];
form.setParameter( "{actionForm.firstName}", "Bob" );
form.setParameter( "{actionForm.lastName}", "Smith" );
form.setParameter( "{actionForm.email}", "bobsmith@beehive.com" );
form.setParameter( "wlw-select_key:{actionForm.langPref}", "Japanese" );
form.setParameter( "wlw-select_key:{actionForm.favCategory}", "CATS" );
form.setCheckbox("wlw-checkbox_key:{actionForm.myListOpt}", false);
form.setCheckbox("wlw-checkbox_key:{actionForm.bannerOpt}", false);
// Submit
resp = form.submit();
// Logout, then login again
resp = resp.getLinkWith("Sign Out").click();
resp = Util.doSignIn("beehive", "beehive");
resp = resp.getLinkWith("My Account").click();
// Make sure the values stuck
form = resp.getForms()[1];
assertEquals(form.getParameterValue("{actionForm.firstName}"), "Bob");
assertEquals(form.getParameterValue("{actionForm.lastName}"), "Smith");
assertEquals(form.getParameterValue("{actionForm.email}"), "bobsmith@beehive.com");
assertEquals(form.getParameterValue("wlw-select_key:{actionForm.langPref}"), "Japanese" );
assertEquals(form.getParameterValue("wlw-select_key:{actionForm.favCategory}"), "CATS" );
assertNull(form.getParameterValue("wlw-checkbox_key:{actionForm.myListOpt}"));
assertNull(form.getParameterValue("wlw-checkbox_key:{actionForm.bannerOpt}"));
// Now set them back to the default
form.setParameter( "{actionForm.firstName}", "Joe" );
form.setParameter( "{actionForm.lastName}", "User" );
form.setParameter( "{actionForm.email}", "yourname@yourdomain.com" );
form.setParameter( "wlw-select_key:{actionForm.langPref}", "English" );
form.setParameter( "wlw-select_key:{actionForm.favCategory}", "DOGS" );
form.setCheckbox("wlw-checkbox_key:{actionForm.myListOpt}", true);
form.setCheckbox("wlw-checkbox_key:{actionForm.bannerOpt}", true);
form.submit();
}