AXE-Core-Maven-Html is throwing RuntimeException: Error when removing sandbox from iframes in Selenium with Java

457 Views Asked by At

Software dependency versions used:

com.deque.html.axe-core : 4.0.0

Code that we have used:

File file = new File("src/main/resources/axe.min.js");

String path = file.getCanonicalPath();

AxeBuilder builder = new AxeBuilder();
 
String timeoutFilePath = "src/main/resources/axe.min.js";
 
FileAxeScriptProvider axeScriptProvider = new FileAxeScriptProvider(timeoutFilePath);
 
builder.setAxeScriptProvider(axeScriptProvider);
 
Results result = builder.analyze(driver);
 
List<Rule> violations = result.getViolations();
 
Assert.assertEquals(0, violations.size(), "No violations found");

Exception:

"java.lang.RuntimeException: Error when removing sandbox from iframes"

Can anyone please help us with this issue.

0

There are 0 best solutions below