In this video we will create an NUnit project to automate the test using Selenium and Specflow. Specflow is the Cucumber for .Net.
So we will use Specflow with selenium to automate the test using c# .net.
Steps :
1. Create an NUnit project
2. Download below packages through nuget manager
specflow.nunit
SpecFlow.Tools.MsBuild.Generation
SpecFlow.NUnit.Runners
Selenium.WebDriver
Selenium.Support
Selenium.Chrome.WebDriver
3. Add/download extension 'Specflow for visual studio '
4. Create a feature file from add item menu
5. Provide your feature file name
6. Create your steps in feature file using below gherkin keywords
And, When, Then , Given
7. Provide parameters in the keyword using double quotes
For example : Given User navigate to " "
8. Once done, generate the step definitions by doing right click on the keywords.
9. Copy all the step definitions to clipboard.
10. Create a new class and add class attribute as [Binding].
11. Now paste all the step definitions in that class.
12. Write code to perform all the operation like click, navigate, input text
13. Once done, build the project.
14. When successfully build, open test explorer window
16. This window will display all the test available in feature file.
17. Select the test which you want to run.
16. And the click on run.
17. Test case will get executed and you will get the result on output console.
Please comment your queries.
Also, please hit like and subscribe button.
Please watch my other videos -
Selenium with C# - Klov server : • Selenium with C# | Klov Report Server
Selenium with C# - Parallel Execution and Screenshot : • Video
Selenium with C# - All about feature files - Gherkin - BDD : • Video
Selenium with C# - Extent Report : • Selenium with C# | Extent Report
Serilog - Logging in Automation Framework : • Serilog | Logging in Automation Frame...
Selenium with C# - Specflow - External Bindings : • Selenium C# | Specflow | External Bin...
Selenium with C# Working with Excel - Part 1 : • Video
Selenium C# - Visual Studio Code : • Selenium C# | Visual Studio Code | No...
Смотрите видео Selenium with C# | Create project to automate test | Specflow онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Maximum Automation 31 Июль 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 4,070 раз и оно понравилось 40 людям.