Welcome to the WebdriverIO Testing repository! This repository contains code and examples for implementing test automation using WebdriverIO, a powerful test automation framework for Node.js. With WebdriverIO, you can conduct end-to-end, unit, and component testing in the browser environment.
- End-to-end, unit, and component testing in the browser
- Supports BDD or TDD test frameworks
- Local and cloud-based testing
- Automated waiting for elements to appear before interaction
- Command line interface for easy configuration setup
- Integration with various test frameworks and reporter plugins
Check out this demo of running WebdriverIO tests:
To get started with WebdriverIO, follow these steps:
-
Create a project folder and open it on Visual Studio Code or a text editor of your choice.
-
Install WebdriverIO in your project:
npm install @wdio/cli
-
Create a configuration file for WebdriverIO:
npx wdio config
-
Create a
Tests
folder in your project directory. Inside theTests
folder, create aSpecs
folder. Then, create a file calledtest.e2e.js
inside theSpecs
folder and add your test script.const { expect, browser, $ } = require("@wdio/globals"); describe("Form Submit Demo", () => { it("should fill form input fields", async () => { await browser.url('https://www.linkedin.com/in/mejbaur/'); await $("#title").setValue("John Doe"); await $("#description").setValue("Hello there"); await $("#btn-submit").click(); }); });
-
Run the test:
npm run wdio
Once the command is done running, you should be able to see the results of the tests on the command line.
Watch the video tutorial for a visual guide on getting started with Jasmine.
We welcome contributions to this repository! To contribute, follow these steps:
- Fork the repository
- Create a new branch for your features or fixes
- Make your changes
- Test your changes thoroughly
- Submit a pull request
Mejbaur Bahar Fagun
Product Acceptance Engineer (L2) @ DEVxHUB | 🥸 Lead SQA and 🐞 Security Analysts 🐛 Bug Bounty 👻 DevSecOps