/web-automation-wdio

This repository contains web automation code example using webdriverio js

Primary LanguageJavaScript

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

❓ What is this Repository about?

  • This repo contains example code for the following demo website:

  • WebdriverIO is used as web automation framework

  • This repo showcases how to run the tests on

    • Chrome browser on local machine
    • Chrome browser on LambdaTest cloud grid
    • Firefox browser on local machine
    • Microsoft Edge browser on local machine
  • This repo covers example to run tests in parallel across different browsers

  • GitHub Actions has been setup for this project, which runs the tests as soon as code is pushed

Scenarios covered in the example tests using WebdriverIO

  1. Performing browser navigation
  2. Ticking and Unticking checkboxes
  3. Performing double click action on a WebElement
  4. Selecting values using single and multi-select dropdown boxes.
  5. Handling JavaScript Alerts covering the following:
    1. Getting Text from alert,
    2. Accept Alert
    3. Dismiss Alert
    4. Enter text and Confirm alert
  6. Working with HTML tables - getting value from rows and columns
    1. Fetch records from rows and columns in table
    2. Printing the data from the table using For Loop
    3. Searching a record from the table and verifying it
    4. Sort the table records on a particular column and verify the column values
  7. Performing Mouse hover over a WebElement
  8. Handling multiple windows
  9. Ticking and Unticking Radio buttons
  10. Performing Right click action
  11. Typing values in the textbox
  12. Capturing Screenshot of the web page

Running the Tests

  1. Clone the repository in your local machine by running the following command:

    • git clone git@github.com:mfaisalkhatri/web-automation-wdio.git
  2. Install the dependencies by running the following command:

    • npm install
  3. To run the test on local machine use the following command:

    • npm run test_local
  4. To run the test on LambdaTest cloud grid

    • Make sure to add the LambdaTest Username and accesskey in the environment variable
    • Checkout the lambdatest.conf.js file for the configuration details

    To run the tests use the following command:

    • npm run test_cloud

🧬 Need Assistance?

  • Discuss your queries by writing to me @ mohammadfaisalkhatri@gmail.com OR ping me on any of the social media sites using the below link:

✍️ Blog Links

💭 Checkout the blogs related to Testing on

🔖 Checkout videos related to Software Testing and Test automation tools on Testing Talks with Faisal Khatri