Search in sources :

Example 1 with HtmlButtonInput

use of com.gargoylesoftware.htmlunit.html.HtmlButtonInput in project javaee7-samples by javaee-samples.

the class UserTest method testButton.

@Test
public void testButton() throws IOException {
    HtmlButtonInput button = (HtmlButtonInput) page.getElementById("button1");
    assertEquals("Login4", button.asText());
    HtmlPage output = button.click();
    assertEquals("HTTP GET (Login)", output.getTitleText());
}
Also used : HtmlPage(com.gargoylesoftware.htmlunit.html.HtmlPage) HtmlButtonInput(com.gargoylesoftware.htmlunit.html.HtmlButtonInput) Test(org.junit.Test)

Aggregations

HtmlButtonInput (com.gargoylesoftware.htmlunit.html.HtmlButtonInput)1 HtmlPage (com.gargoylesoftware.htmlunit.html.HtmlPage)1 Test (org.junit.Test)1