Eugene Plaksienko
Eugene Plaksienko

Reputation: 11

SpecFlow only calls first line of scenario

I'm using a SpecFlow scenario for logging my users in.

I've got two indentical lines seperated by an And, but the binding get's only called for the first line. I'm using the following code:

Background:

Given User 'User1' at 'RC1' logged in
And User 'User2' at 'RC2' logged in

Binding:

[Given(@"User '(.*)' at '(.*)' logged in")]
public void GivenUserAtLoggedIn(string p0, string p1)
{
    new Login(p1, p0);
    ScenarioContext.Current.Pending();
}

Upvotes: 0

Views: 72

Answers (1)

AlSki
AlSki

Reputation: 6961

Remove the line

ScenarioContext.Current.Pending();

As that stops the execution of the full scenario.

Upvotes: 2

Related Questions