通过document.write错误调用了阻止解析器的跨站点脚本“应用程序的URL”,并且未执行其他步骤

时间:2018-11-05 09:34:28

标签: javascript selenium selenium-webdriver webdriver selenium-chromedriver

我正在自动化Web应用程序。该应用程序正在启动,但随后的步骤未执行,并且测试保持静止而没有失败。

在此期间,控制台显示以下消息:

A parser-blocking, cross-site script, "URL of application", is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.

我想 document.write 函数失败。请提出是网络还是应用程序问题。

1 个答案:

答案 0 :(得分:-1)

此错误消息...

A parser-blocking, cross-site script, "URL of application", is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message.

...表示当应用程序( AUT 调用 document.write() 方法以编写 HTML表达式时 JavaScript代码到文档中,调用了 parser-blocking 跨站点脚本


分析


解决方案

显然,如果您使用的是将 2G 连接转换为 3G 4G 连接,则似乎可行的解决方案可以解决您的问题。


参考

一些参考文献:


tl;博士

一些重要的相关讨论: