我想使用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
。
有人可以帮我吗? :)
答案 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();
您可能会发现一些有用的/更容易使用的替代方法: