- An internet connection
- Google Chrome
- Visual Studio Community Edition (Free) https://visualstudio.microsoft.com/vs/community/
- .Net 6 SDK will need to be installed on your machine
- A Github account
- Git client (feel free to use your favourite)
- The project needs to be completed using the prescribed tools and coding language C#.
- You will need to clone the repository to your local machine.
- Create a new branch with an appropriate name to develop your tests
- Open the project using Visual Studio and ensure the below are installed to the project
- Selenium WebDriver (installed via Nuget package manager into your project)
- Selenium WebDriver ChromeDriver (installed via Nuget package manager into your project)
- NUnit test framework (installed via Nuget package manager into your project)
- NUnit3TestAdapter (installed via Nuget package manager into your project)
- Set your driver instances implicit wait to 15 seconds; example: yourDriver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(15); (This is required for the test to run smoothly)
- Hint: Add comments in your code to justify your thinking.
- Hint: You can use any method to identify the elements you interact with.
Automate some operations on the following Selenium practice website: https://www.saucedemo.com/ as described below. You have two objectives, please create a seperate test for each and use an appropriate test name for each test.
Log In Steps to Automate:
- Open this url https://www.saucedemo.com/
- Select a username from the list of accepted usernames
- Enter that into the Username field
- Enter the password in the Password field
- Click the login button
- Verify that the user has been logged in successfully
Purchase a product Steps to Automate:
- Open this url https://www.saucedemo.com/
- Sign into the web site
- Select any product and click the "Add to cart" button for that product
- Click the shopping cart button
- Verify the product you selected has been added to the cart
- Checkout
- Enter a Firstname, Lastname and Zip Code into the fields
- Click Continue
- Verify that the correct product is still in the cart
- Click Finish
- Verify that the confirmation message is displayed
- Push your changes to Github and create a Pull Request for your tests