在C#Selenium项目中为“魅力”报告定义步骤

时间:2019-07-03 11:44:04

标签: c# selenium allure nunit-3.0

我想知道是否有可能像Java中一样为C#中的测试定义诱人的步骤。有没有办法使用它?

@Step("Step title: {0}")
public void func(String parameter, WebDriver driver) {}

1 个答案:

答案 0 :(得分:0)

好的,我找到了答案

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