diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java index 995ec35615..36af64ba1d 100644 --- a/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java +++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/jiras/Surefire260TestWithIdenticalNamesIT.java @@ -53,6 +53,7 @@ public void testWithIdenticalNames() throws IOException { final URI uri = reportsFile.toURI(); try (WebClient webClient = new WebClient()) { + webClient.getOptions().setJavaScriptEnabled(false); HtmlPage page = webClient.getPage(uri.toURL()); HtmlAnchor a = (HtmlAnchor) page.getByXPath("//a[@href = \"javascript:toggleDisplay('surefire260.TestB.testDup');\"]") @@ -60,6 +61,7 @@ public void testWithIdenticalNames() throws IOException { HtmlTableRow content = (HtmlTableRow) page.getElementById("surefire260.TestB.testDup-failure"); assertNotNull(content); assertTrue(content.getAttribute("style").contains("none")); + webClient.getOptions().setJavaScriptEnabled(true); a.click(); assertFalse(content.getAttribute("style").contains("none")); }