我需要能夠截取網頁截圖並將其保存到我的硬盤上的文件夾中。爲此,我嘗試使用captureEntirePageScreenshot,將我要用作目標的文件夾。selenium ide截圖保存失敗
<tr>
<td>captureEntirePageScreenshot</td>
<td>C:\Users\.....\Desktop\test</td>
<td></td>
</tr>
當我告訴它執行時,出現以下錯誤。注意:selenium上的基本URL和網頁匹配。
[error] Unexpected Exception: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFileOutputStream.init]" nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame :: chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js :: <TOP_LEVEL> :: line 2986" data: no]. QueryInterface -> function QueryInterface() { [native code] }, message -> Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFileOutputStream.init], result -> 2152857621, name -> NS_ERROR_FILE_ACCESS_DENIED, filename -> chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js, lineNumber -> 2986, columnNumber -> 0, location -> JS frame :: chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js :: <TOP_LEVEL> :: line 2986, inner -> null, data -> null, initialize -> function initialize() { [native code] }
如果有人能幫助我理解這一點並解決它,我將不勝感激。
你有什麼版本的Firefox以及哪個版本的IDE?這是否剛剛開始?它之前工作過嗎? Firefox最近升級了嗎?你在其他機器上遇到問題嗎? – Arran
firefox:22.0;硒:2.2.0;我不知道這是否剛剛開始,或者我的同事遇到類似的問題,因爲我/我們現在不需要保存屏幕截圖。最近的Firefox升級是上個月。 – Skulgren
更正:我們應用的最新Firefox升級是在上個月完成的。 – Skulgren