Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
AXE Core Maven Html在使用Java从Selenium的iFrame中删除沙盒时抛出RuntimeException:错误_Java_Selenium_Axe - Fatal编程技术网

AXE Core Maven Html在使用Java从Selenium的iFrame中删除沙盒时抛出RuntimeException:错误

AXE Core Maven Html在使用Java从Selenium的iFrame中删除沙盒时抛出RuntimeException:错误,java,selenium,axe,Java,Selenium,Axe,使用的软件依赖版本: com.deque.html.axe-core:4.0.0 我们使用的代码: File File=new文件(“src/main/resources/axe.min.js”) String path=file.getCanonicalPath(); AxeBuilder builder=新的AxeBuilder(); 字符串timeoutFilePath=“src/main/resources/axe.min.js”; FileAxeScriptProvider axeSc

使用的软件依赖版本:

com.deque.html.axe-core:4.0.0

我们使用的代码:

File File=new文件(“src/main/resources/axe.min.js”)

String path=file.getCanonicalPath();
AxeBuilder builder=新的AxeBuilder();
字符串timeoutFilePath=“src/main/resources/axe.min.js”;
FileAxeScriptProvider axeScriptProvider=新的FileAxeScriptProvider(timeoutFilePath);
builder.setAxeScriptProvider(axeScriptProvider);
结果=builder.analyze(驱动程序);
列出违规行为=result.getViolations();
Assert.assertEquals(0,违规.size(),“未发现违规”);
例外情况:

“java.lang.RuntimeException:从iFrame中删除沙盒时出错”


有谁能帮我们解决这个问题。

司机的电话在哪里?看起来他们希望您已经等待帧加载。(在分析方法中通过iFrame递归时,不使用webdriverwaits…)是。我们已经创建了webdriver实例,将相同的webdriver实例传递给analyze方法。如果您能提出解决此问题的任何解决方案,那就太好了。能否请您指导我们如何重新关注此问题。您是否转到了URL?是的,我可以导航到应用程序URL,一旦应用程序启动,我们将传递驱动程序实例以分析方法。包括您的驱动程序初始化和调用。。。(这些东西的顺序很重要)并且考虑AXE代码没有等待IFRAMS加载。
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");