Contains feature files written in Gherkin syntax describing scenarios and steps for understanding and reading easily.
Setup the driver configuration that runs before and after tests.
For more readable and understandable code, the project uses the page objects model. All methods used in the step definitions are defined here.
Methods mapped from Gherkin feature files. These methods implement the actions described in the feature files.
Contains C# code for extent reports.
- Install Visual Studio.
- Open Visual Studio and continue without a project.
- Go to Extensions and click on Manage Extensions.
- Install SpecFlow by searching in the search box. Close it; it will open automatically and modify itself.
- Import an existing Project you have.
- Project folders are displayed. Right-click on the dependencies and click on Manage NuGet.
- Install Selenium WebDriver (stable version) and Extent Reports (v4.1.0).
- Run the project from the test explorer.
- Given go to amazon website
- When click on the search input field and search "hats for men"
- And click on the search button
- And add the first hat to Cart with a quantity of two
- Then open the cart and assert total price and quantity are correct
- When search "hats for women"
- And click on the search button
- And add the first hat to Cart with a quantity of one
- And click on the cart and check that quantity is correct
- And change the quantity for the item selected at step three from two to one item in the Cart
- Then assert total price and quantity are changed correctly
Result should be as per requirements.
As Expected.