Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Crash Error on Flush for Html Report #158

Open
VinayBerry opened this issue Oct 18, 2022 · 0 comments
Open

Getting Crash Error on Flush for Html Report #158

VinayBerry opened this issue Oct 18, 2022 · 0 comments

Comments

@VinayBerry
Copy link

Code I'm using:

            ExtentReports report = new();

            ExtentHtmlReporter reporter = new("./temp");

            report.AttachReporter(reporter);

            var suiteNode = report.CreateTest("SmokeTests");

            var testNode = suiteNode.CreateNode("Test Case");

            var stepNode = testNode.CreateNode("Step 1");

            stepNode.Info("Enter text 1234567890");

            stepNode.Info("Press Enter");

            stepNode.Info("Wait for 1 second");

            testNode.Info("Done");

            testNode.Pass("Passed");

            suiteNode.Pass("Passed");

            report.Flush();

If I run it by itself in a simple net5.0 console app or nunit test project it works fine.

But when i bring it into my actual project the same lines of code throw this error when Flush runs.

Getting this error:

Expression of type 'CompiledRazorTemplates.Dynamic.RazorEngine_c0f4c169c96049869b66f099bf3cad0a' cannot be used for return type 'RazorEngine.Templating.ITemplate'

Project Version: net5.0
Extent Package Version: 4.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant