October 26, 2021

Fix "OneTimeSetUp: System.ArgumentNullException : Value cannot be null. (Parameter 'value')" when using Specflow - Selenium

  October 26, 2021

When the method didn't receive enough arguments while execution, we may get System.ArgumentNullException : Value cannot be null

If we are using a combination of Selenium-SpecFlow-NUnit-.Net Core, there will be different scenarios where the following error can occur.

Message: 

    OneTimeSetUp: System.ArgumentNullException : Value cannot be null. (Parameter 'value')

This error will usually be caught in the OneTimeSetUp method in .cs file of the spec flow feature file.

In this case, check the following options to fix this easily.

  • Check the version of  .Net Core (Some versions doest support some arguments of Specflow)
  • Check the Specflow Tools version and Specflow NUnit version are the same
  • Check if the .runsetting file is mapped correctly in Visual studio - Test > Configure Run Settings



logoblog

Thanks for reading Fix "OneTimeSetUp: System.ArgumentNullException : Value cannot be null. (Parameter 'value')" when using Specflow - Selenium

Previous
« Prev Post

No comments:

Post a Comment

Bookmark this website for more workarounds and issue fixes.

Verify Zip file contents without extracting using C# + Selenium

While doing automation testing, we may get a scenario where we need to download a zip file and to validate the contents inside it. One way t...