mfaisalkhatri / selenium4poc

Learn Web Automation testing using Selenium Webdriver 4.
https://mfaisalkhatri.github.io
Apache License 2.0
178 stars 71 forks source link
beginner-friendly examples hacktoberfest java selenium selenium-java selenium-webdriver test-automation testing tutorial webautomation webautomationtesting

Open Source Love License Java CI with Maven CodeQL

Don't forget to give a :star: to make the project popular.

:question: What is this Repository about?

Talking more about the Scenarios Covered in this project:

  1. How do I select a value from Table?
  2. How do I tick and untick checkboxes using selenium
  3. How do I right-click using selenium?
  4. How do I drag and drop using selenium?
  5. How do I write code to log in and logout using Selenium?
  6. How do I pass multiple test data value using DataProvider in tests?
  7. How do I mouse hover an element using selenium?
  8. How do I download a file using Selenium?
  9. How do I upload file using selenium?
  10. How do I press keys using selenium?
  11. How do I work with multiple Tab windows in selenium?
  12. How do I work with iFrames using Selenium?
  13. How do I double-click using Selenium WebDriver?
  14. How to check for chrome generated logs when selenium tests are run?

:writing_hand: Blog Links

:movie_camera: Tutorial Videos

Watch the video Watch the video Watch the video Watch the video Watch the video Watch the video Watch the video

End-to-End Tests for OWASP-Juice-Shop

Following is the Automation Test Strategy used for writing End-to-End Tests:

  1. User will navigate to the website and close all the pop-up first.
  2. User will click on Login link and click on Not yet a customer link and register himself on the website.
  3. Once the Registration is successful, User will Log in with that username and password.
  4. After successful Login, User will Add AppleJuice and BananaJuice to the Basket.
  5. After asserting the messages for items added to basket, user will check for the count of items displayed on top of Your Basket link.
  6. User will click on Your Basket link and check the order details and click on Checkout.
  7. User will enter a new Address for Delivery and select it to process further.
  8. User will continue further to Card for Payment and select the card added to make payment.
  9. On the Order Summary page, user will verify all the details like Name, Address, Order details and total amount to be paid and place order.
  10. User will re-check the details on Order confirmation page and check for Thank You message order confirmation and delivery message.

End-to-End Tests for LambdaTest ECommerce Playground Website

Following is the automation test strategy used for writing end-to-end tests:

  1. The User will navigate to the website.
  2. From the Home Page of the screen, user will navigate to the Registration Page and register himself. Verification will be done by asserting the registration successful message.
  3. User will click on the Shop by Category option on the top left and select a category for selecting the product to purchase.
  4. From the Product Page, the user will hover on any product which he likes and select the Add to cart option. Once a product is added to cart, assertions will be performed to check the success message displayed.
  5. On the Checkout page, user will provide the billing address details and also assertion will be made for product name and its respective price.
  6. Once a product is checked out, the user lands on the Order Confirmation page, where product name, price and shipping address will be asserted and after that Order would be marked as confirmed.
  7. Finally, an Order confirmation message would be verified in the tests which marks the end of the test journey.

How to run the Tests?

Running Juice Shop Tests on your local machine:

Running Selenium Grid on local and running tests using Selenium Grid

Running all the tests in one go:

Running LambdaTest ECommerce Playground Tests on your local machine:

:question: Need Assistance?

:computer: Paid Trainings

:thought_balloon: Checkout the blogs related to Testing written by me on the following links:

:computer: Recommended Proxies

There are cases when proxies may be required to run the tests, this may happen when the software teams are working in isolation at different places. Residential proxies help in keeping the user’s information safe and help in hiding the real location of the user It acts as a middleman between the device and the internet and keep the users safe from being tracked.

NodeMaven provides high quality proxies with industry-first filtering, super sticky sessions and best customer support. Try out NodeMaven now(Use F86 at checkout to get extra 2GB of proxy)

:bulb: Cloud platform supporter

Big thanks to LambdaTest for their support to the project with their open source license:

lambdatest