Warm tip: This article is reproduced from stackoverflow.com, please click
c# selenium allure nunit-3.0

Defining steps in C# Selenium project for Allure report

发布于 2020-03-27 10:24:04

I am wondering is it possible to define allure steps for tests in C# just like in Java. Is there any way to use it?

@Step("Step title: {0}")
public void func(String parameter, WebDriver driver) {}
Questioner
newbieXX
Viewed
128
newbieXX 2019-07-03 22:37

Alright, I've found an answer

        public Page DoAction(Object object)
        {
            AllureLifecycle.Instance.WrapInStep(() =>
            {
                pageInput.SendKeys(object.field);
            }, "Action");
            return new HomePage();
        }