use of com.gargoylesoftware.htmlunit.html.HtmlTextInput in project core by weld.
the class NamedProducerTest method testNamedProducerFieldLoosesValues.
/*
* description = "WELD-404"
*/
@Test
public void testNamedProducerFieldLoosesValues() throws Exception {
WebClient client = new WebClient();
HtmlPage page = client.getPage(getPath("/home.jsf"));
// Check the page rendered ok
HtmlSubmitInput saveButton = getFirstMatchingElement(page, HtmlSubmitInput.class, "saveButton");
HtmlTextInput employeeFieldName = getFirstMatchingElement(page, HtmlTextInput.class, "employeeFieldName");
HtmlTextInput employeeMethodName = getFirstMatchingElement(page, HtmlTextInput.class, "employeeMethodName");
Assert.assertNotNull(employeeFieldName);
Assert.assertNotNull(employeeMethodName);
Assert.assertNotNull(saveButton);
employeeFieldName.setValueAttribute("Pete");
employeeMethodName.setValueAttribute("Gavin");
saveButton.click();
}
Aggregations