Skip to content

Commit

Permalink
Replace deprecated HtmlUnit methods with new ones.
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Feb 14, 2022
1 parent 42590ca commit 9d42c3d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ public void testELWithParameters(@ArquillianResource URL baseURL) throws Excepti
HtmlSpan oldel = getFirstMatchingElement(page, HtmlSpan.class, "oldel");
assertNotNull(oldel);
final String charlie = "Charlie";
assertEquals(charlie, oldel.asText());
assertEquals(charlie, oldel.asNormalizedText());

HtmlSpan newel = getFirstMatchingElement(page, HtmlSpan.class, "newel");
assertNotNull(newel);
assertEquals(charlie, newel.asText());
assertEquals(charlie, newel.asNormalizedText());
}

protected <T> Set<T> getElements(HtmlElement rootElement, Class<T> elementClass) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ public void testActionMethodExceptionDoesNotDestroyContext() throws Exception {
Assert.assertEquals("Application Error", page.getTitleText());

HtmlDivision conversationValue = getFirstMatchingElement(page, HtmlDivision.class, "conversation");
Assert.assertEquals("10", conversationValue.asText());
Assert.assertEquals("10", conversationValue.asNormalizedText());

HtmlDivision requestValue = getFirstMatchingElement(page, HtmlDivision.class, "request");
Assert.assertEquals("medium", requestValue.asText());
Assert.assertEquals("medium", requestValue.asNormalizedText());
}

protected String getPath(String page) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void testELContextOfDepedentScopeBean() throws Exception {
WebClient client = new WebClient();
client.getOptions().setThrowExceptionOnFailingStatusCode(false);
HtmlPage main = client.getPage(url);
assertTrue(main.getBody().asText().contains("Hello from dependent scope bean"));
assertTrue(main.getBody().asNormalizedText().contains("Hello from dependent scope bean"));
}

}

0 comments on commit 9d42c3d

Please sign in to comment.