温馨提示:本文翻译自stackoverflow.com,查看原文请点击:其他 - Defining steps in C# Selenium project for Allure report
c# selenium allure nunit-3.0

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

发布于 2020-03-27 11:18:43

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

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

查看更多

查看更多

提问者
newbieXX
被浏览
138
newbieXX 2019-07-03 22:37

好了,我找到了答案

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