1. 程式人生 > >在jenkins打開roboframework報告:Opening Robot Framework report failed

在jenkins打開roboframework報告:Opening Robot Framework report failed

eva meta new too lba adding nco there alert

來源自:

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>

    技術分享圖片

  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. 運行結果

    技術分享圖片

  4. 再點擊要打開的測試報告或輸出文件,OK啦

    註:配置完之後最好把jenkins重啟下且把瀏覽器緩存清下

在jenkins打開roboframework報告:Opening Robot Framework report failed