MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / click

Method click

src/test/java/org/htmlunit/html/HtmlArea2Test.java:75–85  ·  view source on GitHub ↗

@throws Exception if the test fails

()

Source from the content-addressed store, hash-verified

73 * @throws Exception if the test fails
74 */
75 @Test
76 public void click() throws Exception {
77 final WebClient client = createWebClient("");
78
79 final HtmlPage page = client.getPage(URL_FIRST);
80 final HtmlArea area = page.getHtmlElementById("third");
81
82 // Test that the correct value is being passed back up to the server
83 final HtmlPage thirdPage = area.click();
84 assertEquals("third", thirdPage.getTitleText());
85 }
86
87 /**
88 * @throws Exception if the test fails

Calls 5

createWebClientMethod · 0.95
getPageMethod · 0.95
getHtmlElementByIdMethod · 0.95
getTitleTextMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected