我需要能够截取网页截图并将其保存到我的硬盘上的文件夹中。为此,我尝试使用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