【问题标题】:Can we give test case name as title of screenshot in protractor?我们可以在量角器中将测试用例名称作为屏幕截图的标题吗?
【发布时间】:2015-01-06 06:15:54
【问题描述】:

来自 protractorConfig.js

jasmine.getEnv().addReporter(new HtmlReporter({
  baseDirectory: './reports/'+outputFolder+'/screenshots',
  takeScreenShotsOnlyForFailedSpecs: true
}));

有一个选项,docTitle,但不确定如何在此处获取测试用例名称作为标题....

【问题讨论】:

    标签: testing jasmine protractor end-to-end


    【解决方案1】:

    在 jasmine 1.3 中,它是:

    jasmine.getEnv().currentSpec.description
    

    在 jasmine 2.x 中,记者将能够访问描述名称。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-01-16
      • 2022-12-09
      • 2019-08-19
      • 2018-09-04
      • 2012-09-07
      • 1970-01-01
      • 2017-03-27
      相关资源
      最近更新 更多