Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在selenium ide中截图_Selenium - Fatal编程技术网

如何在selenium ide中截图

如何在selenium ide中截图,selenium,Selenium,使用Selenium IDE Firefox插件,我想自动截图。测试脚本包含以下步骤 Command Target Value open /?gfe_rd=cr&ei=GNCWU-6BCujV8geh_4C4Bg&gws_rd=ssl click id=gbqfq type

使用Selenium IDE Firefox插件,我想自动截图。测试脚本包含以下步骤

Command                          Target                               Value
open      /?gfe_rd=cr&ei=GNCWU-6BCujV8geh_4C4Bg&gws_rd=ssl  
click                              id=gbqfq     
type                               id=gbqfq                      software testing
click                               id=gbqfb    
captureEntirePageScreenshotAndWait  F:\Screenshots\
日志显示此错误:-

[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]. toString -> function toString() { [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, inner -> null, data -> null, location -> JS frame :: chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js :: <TOP_LEVEL> :: line 2986
[error]意外异常:[Exception…”组件返回故障代码:0x80520015(NS_error_FILE_ACCESS_DENIED)[nsIFileOutputStream.init]“nsresult:”0x80520015(NS_error_FILE_ACCESS_DENIED)”位置:“JS帧::chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js 第2986行“数据:否”。toString->function toString(){[本机代码]},消息->组件返回失败代码:0x80520015(NS\u错误\u文件\u访问被拒绝)[nsIFileOutputStream.init],结果->2152857621,名称->NS\u错误\u文件\u访问被拒绝,文件名->chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js,行号->2986,列号->0,内部->空,数据->空,位置->JS帧::chrome://selenium-ide/content/selenium-core/scripts/selenium-api.js 第2986行

请解决此错误

有一个失败插件的屏幕截图。它根据名称在故障点抓取HTML的屏幕截图。以下是链接:

该插件直接与Selenium集成,因此您可以通过UI本身打开或关闭它。要安装它,请使用FIREFOX浏览器打开链接,然后单击“添加到FIREFOX”链接。(对于那些不熟悉Selenium IDE的人,它只插入Firefox。)


正确安装后,您将在“快-慢”滑块旁边的失败图标上看到屏幕截图。打开此按钮可打开此功能,关闭此按钮表示不会拍摄快照。默认情况下,当IDE启动时,它处于关闭状态。它旁边的小向下箭头允许您查看屏幕截图/故障报告。

请参阅。您关于“仅链接的答案可能无效”的评论是正确的,但这不是仅链接的答案。从这个答案中,即使链接不起作用,我们也知道存在一个名为Screenshot on Failure的插件。我们知道插件的作用,以及如果我们能够找到它,它将如何提供帮助。看看你的答案在另一座城堡里:当一个答案不是答案时:谢谢ArtOfWarfare和l3arnon。在任何情况下,我都提供了一些更详细的信息。