I\'m using SpecFlow with Selenium WebDriver and SpecRun as test runner to create and execute automated test cases and I\'m loo
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");