我需要能够截取网页的屏幕截图并将其保存到硬盘驱动器上的文件夹中。为此,我尝试使用 captureEntirePageScreenshot,设置我要用作目标的文件夹。
<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] }
如果有人可以帮助我理解并解决它,我将不胜感激。