使用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
请解决此错误
答案 0 :(得分:0)
有一个关于失败插件的屏幕截图。它根据它的名称在失败点抓取HTML的屏幕截图。这是链接:
https://addons.mozilla.org/en-US/firefox/addon/screenshot-on-fail-selenium/
此插件直接与Selenium集成,因此您可以通过UI本身打开或关闭它。要安装它,请使用FIREFOX浏览器打开链接,然后单击&#34;添加到FIREFOX&#34;链接。 (对于那些不熟悉Selenium IDE的人来说,它只会插入Firefox。)
正确安装后,您将看到&#34; FAST - SLOW&#34;旁边的“失败时屏幕截图”图标。滑块。切换此按钮可打开该功能,将其切换为意味着不会拍摄快照。默认情况下,启动IDE时它处于关闭状态。旁边的微小向下箭头允许您查看屏幕截图/失败报告。