Issue
I am trying to implement axe-selenium-java into our Selenium automation framework and am having a problem with the excludes function. Essentially it seems to ignore the item(s) I ask it to exclude and just evaluates the whole page.
As you can see its pretty simple what Im looking for, Im asking it to exclude the header and evaluate everything inside the main tags as the header content it looked after by another team. Example method below:
public void testAccessibility(String method) {
JSONObject responseJSON = new AXE.Builder(driver, scriptUrl)
.include("main")
.exclude("header")
.analyze();
JSONArray violations = responseJSON.getJSONArray("violations");
if (violations.length() == 0) {
assertTrue("No violations found", true);
} else {
AXE.writeResults(method, responseJSON);
assertTrue(AXE.report(violations), false);
}
}
Does anyone know why this wouldnt be working?
Solution
This is a bug with Axe which will be resolved in the next release.
I was informed on gitter here: https://gitter.im/dequelabs/axe-core?at=5e60f792cb91b5224f1134c8
Having a look on GitHub, this appears to be the issue. https://github.com/dequelabs/axe-selenium-java/issues/42
Answered By - christopher harris
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.