I've written two Scenario's in Specflow, one for UI and other for API. The scenario's and the step definitions are as follows:
Scenario 1:
@Regression
Scenario Outline: Add Single New External User
Given the <role> is logged on to the portal with <email> and <password>
When the <role> clicks on profile avatar
Something....
Scenario 2:
@GetClientList
Scenario Outline: GET API response for fetching list of Clients matching
criteria entered in the Search Text field
Given the <endpoint>
When I call Get method
Something....
Step Definitions:
[Given(@"the (.*) is logged on to the portal with (.*) and (.*)")]
public void GivenLoginToPortal(string role, string email, string password)
{
//Something
}
[Given(@"the (.*)")]
public void GivenTheEndpoint(string endpoint)
{
Endpoint = endpoint;
}
Here, when I navigate to the Step Definition of the Given Statement in the First Scenario, it shows warning for Multiple matching bindings found..and the multiple match bind refers to the step definition of second Given Statement. But I believe since both the Given Statements are different, then why does the first Given throws multiple match bindings ?