在jenkins打开roboframework报告:Opening Robot Framework report failed

来源自:

https://blog.51cto.com/icestick8586/1884615

----------------------------------------------------------------------

问题:

Opening Robot Framework report failed

Verify that you have JavaScript enabled in your browser.

Make sure you are using a modern enough browser. Firefox 3.5, IE 8, or equivalent is required, newer browsers are recommended.

Check are there messages in your browser's JavaScript error log. Please report the problem if you suspect you have encountered a bug.

解决方案1:

首先在浏览器运行加了此代码的html文件<script>alert('我弹')</script>,如果能弹说明不是浏览器支持JS的问题

  1. <!DOCTYPE html><html><head><meta charset="UTF-8"><title></title></head><body><script>alert('我弹')</script><p>%s</p></body></html>
     

    wKiom1hZLO_gSyJgAAAxKGaHywo157.jpg-wh_50

  2. 如果不是浏览器的问题,解决如下:

    参考:http://stackoverflow.com/questions/36607394/error-opening-robot-framework-log-failed

    在管理jenkins-->脚本命令行输入如下脚本:

    System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;")

  3. 运行结果

     wKioL1hZLqPTGi6XAADesOZx2pg326.jpg-wh_50

  4. 再点击要打开的测试报告或输出文件,OK啦

    注:配置完之后最好把jenkins重启下且把浏览器缓存清下

猜你喜欢

转载自www.cnblogs.com/monogem/p/10871291.html
今日推荐