2

enter image description here

Hello, the step has not been bound (hence, colour purple), even though the underlying step defintions have been implemented.

In the screen shot, I clicked on "Ok". V/Studio takes me to the screen in the next screen shot.

enter image description here

I have tried a few things:

  1. Commented out any other scenarios that may have a similar step

  2. Clicked on the "Save All" button in order to save any changes.

  3. I have also rebuilt the solution. The error shown in the screen shot has been fixed. So, there are no outstanding errors in the project.

Your help will be highly appreciated. Thanks.

2
  • Does it work when you execute the scenarios? Commented Mar 2, 2020 at 6:22
  • No, I am unable to execute the scenarios.
    – OA345
    Commented Mar 3, 2020 at 10:13

2 Answers 2

0

Visual Studio caches the step bindings, and sometimes this cache becomes out of sync with your code. The fix is a bit obtuse, but simple. Close all Visual Studio windows and delete files in your temp directory matching stepmap

  1. Close all Visual Studio windows
  2. Open File Explorer
  3. Click on the location bar showing the current directory. It should turn into an editable text field and highlight the folder path
  4. Type %TEMP% and press Enter to navigate to your temp directory
  5. Type stepmap in the search file text box towards the upper right corner of File Explorer
  6. Delete all files that show up in the file search

Or open a Windows command prompt and type:

del %TEMP%\*stepmap*
1
  • This Fixed The Issue.. Arigato !
    – OA345
    Commented Mar 15, 2020 at 18:00
0

You have two methods with the same Then expression in your StudentStepDefinition.cs file:

    [Then(@"A New Student Record Amoo Should Be Created")]

Each expression needs its own unique expression to be able to bind and run it.

So you need to remove one.

2
  • I have commented the other statement out. But, I still get the error.
    – OA345
    Commented Mar 3, 2020 at 10:12
  • That is due to your other question? Not regeneration the feature.cs files? Commented Mar 3, 2020 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.