C# BDD步骤已绑定和映射
如果有人能帮助我处理这种情况,我将不胜感激 我有一个场景:C# BDD步骤已绑定和映射,c#,selenium,cucumber,bdd,specflow,C#,Selenium,Cucumber,Bdd,Specflow,如果有人能帮助我处理这种情况,我将不胜感激 我有一个场景: Scenario Outline:Modify Account Details Given AccountID is selected in The Quick Search When user enter the <AccountID> in search field And Click on Quick Search button And Close the Alerts And
Scenario Outline:Modify Account Details
Given AccountID is selected in The Quick Search
When user enter the <AccountID> in search field
And Click on Quick Search button
And Close the Alerts
And Click on Edit Link
When Enter the <Email>
And Click on Commit button
Examples:
| AccountID | Email |
| 116999 | test3@domain.co.uk |
但是,当我尝试为第二个场景生成步骤定义时,我无法为以下步骤生成步骤定义
And Enter the <Subject> of the ticket
And Enter the <Comments> and <PersonSpokeTo>
我试图在谷歌上找到一些帮助,但找不到。非常感谢您的帮助。SpecFlow中的步骤不是特定于某个功能的。对于测试项目,它们是全局的。每个步骤只能有一个定义
如果每一步需要多个定义,请考虑在步骤中添加更多的参数,或者对步骤进行短语化,以便更具体地说明应用程序中的用例。
[When(@"Enter the (.*)")]
public void WhenEnterTheEmail(string email)
{
try
{
Helper.ExplicitWait(_driver, AccountDetailsEdit.xPathtxtEmailBilling, 90);
AccountDetailsEdit.txtEmailBilling.Clear();
Helper.EnterTextValue(AccountDetailsEdit.txtEmailBilling, email);
}
catch (Exception e)
{
Console.WriteLine("No Such element found -{0}",e);
_driver.Quit();
throw;
}
}
And Enter the <Subject> of the ticket
And Enter the <Comments> and <PersonSpokeTo>
[When(@"Enter the (.*)")]
public void WhenEnterTheEmail(string email)