Insert screenshots in SpecRun/SpecFlow test execution reports

后端 未结 3 1048
情书的邮戳
情书的邮戳 2021-02-11 04:47

I\'m using SpecFlow with Selenium WebDriver and SpecRun as test runner to create and execute automated test cases and I\'m loo

3条回答
  •  鱼传尺愫
    2021-02-11 05:21

    I encountered today exactly the same problem

    using the Screenshot method with "[" sign was destroying the template additionally I had to use ' and " respectively for template to work, and in My case the final template code looked :

    @Raw(FormatTechMessages(traceEvent.TechMessages.TrimEnd()).Replace("SCREENSHOTXX", ""))

    And the code in class:

    Console.WriteLine($"SCREENSHOTXX {tempFileName} XXSCREENSHOT");
    

提交回复
热议问题