在哪里可以找到使用Java的斧头指南?

时间:2019-05-06 13:38:58

标签: java selenium automation cucumber accessibility

我想使用selenium / java(也许还有黄瓜)来自动化我的可访问性测试。在哪里可以找到指南或教程? 我知道有

  

https://github.com/dequelabs/axe-selenium-java

但是我不理解这段内容:The simplest way to do this is to include it in your own src.test.resources and pass MyTest.class.getResource("/axe.min.js") to the Builder constructor as demonstrated in the ExampleTest.因为找不到ExampleTest。 有人可以帮我吗? :)

1 个答案:

答案 0 :(得分:2)

您要查找的ExampleTest位于所引用的存储库的src/test/java/com/deque/axe文件夹下。万一您找不到它,以防万一:

private static final URL scriptUrl = ExampleTest.class.getResource("/axe.min.js");

JSONObject responseJSON = new AXE.Builder(driver, scriptUrl).analyze();

您可能会发现一些有用的/更容易使用的替代方法: