No overload for 'Given' method takes 4 arguments - specflow

I have specflow installed. And by default I get this script to add two numbers. when i build the solution i get these errors. Msgstr "No overload for 'Given' method takes 4 arguments. What I'm missing here is the generated file.

public virtual void AddTwoNumbers()
        {
            TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("Add two numbers", new string[] {
                        "mytag"});
            #line 7
            this.ScenarioSetup(scenarioInfo);
            #line 8
             testRunner.Given("I have entered 50 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Given ");
            #line 9
             testRunner.And("I have entered 70 into the calculator", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "And ");
            #line 10
             testRunner.When("I press add", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "When ");
            #line 11
             testRunner.Then("the result should be 120 on the screen", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Then ");
            #line hidden

            this.ScenarioCleanup();
        }

      

For this scenario:

Function: SpecFlowFeature1 To avoid stupid mistakes Like a math idiot I want to say the sum of two numbers

@mytag Script: add two numbers Considering I entered 50 into the calculator AND I entered 70 into the calculator When I press add Then the result should be 120 on the screen

+3


source to share


1 answer


It was a techtalk.specflow.dll version issue. I had version 1.8.1, which I replaced with 1.9.0 and it worked! Thanks for ur suggestions



+4


source







All Articles