Cypress and WebDriverIO are both JavaScript-based framework that runs on Node and shares many similarities, but Both are unique in their architecture and feature offerings. Let's discuss how they are different:
Feature | Cypress | WebDriverIO |
---|---|---|
Architecture | Cypress sends HTTP requests and responses from the node server to the browser. Cypress executes the test directly inside the browser. | WebDriverIO is an implementation of the JSON Wire Protocol. It conducts communication using NodeJS and uses RESTful architecture to conduct automation testing. |
API Testing | Cypress has built-in support for making requests to servers. | In WebDriverIO, API testing is possible using 3rd party libraries like wdio-intercept-service. |
Assertions | Cypress bundles the popular Chai assertion library. | WDIO test runner comes with a built-in assertion library expect-webdriverio inspired by the expect library. |
Aynch/Await | In Cypress, Async/await commands are not Promises. Using await on a Cypress chain will not work as expected, and tests are not stable. | Good support for async and await. If you decide to run in async mode, all WebdriverIO commands return a Promise and must await to get the result. |
Auto Waits | In Cypress, there is no requirement to add waits or sleep in the tests. It automatically waits for commands and assertions before moving to the next instruction. | WebdriverIO also provides a built-in wait mechanism that automatically explicitly waits on the element before interacting with it. |
Browser Supported | Cypress supports Chrome, Edge, Firefox, Electron, and Brave. In Version 10.8.0 Safari browser support is added using Playwright-Webkit. | WebdriverIO supports multiple browsers such as Chrome, Edge, Firefox, Internet Explorer, and Safari. |
CI/CD Integration | Cypress is compatible with all Continuous Integration (CI) providers and systems and provides guidelines and files for integration. | WebDriver IO also has good support for CI/CD, but you must explore several options yourself, and configuration takes time. |
Community Support & Documentation | Cypress is well documented and has an excellent community and paid support. | WebDriverIO has good community support and documentation. |
Cost | Cypress is a free-to-use automation tool, but the Cypress dashboard service is free for up to 3 users. | WebDriverIO is open source. Enterprise additional support is available as part of the Tidelift Subscription. |
Dashboard | Cypress has an excellent dashboard to view reports, analytics, recording, and debugging. | No such feature in WebDriverIO. |
Debugging | Cypress provides debugging features like readable stack trace, console logs, pause test, and browser development tool control. | Debugging in WebDriverIO is not advanced like Cypress. You can use the Dev Tools protocol for network interception, tracing, etc. You can use the browser debug command to pause your test and inspect the browser. |
Drag and Drop | Drag and Drop require plugins or custom coding in Cypress. | WebDriverIO has the inbuilt command DragAndDrop. |
File Upload | File Upload in Cypress requires a plugin. | You can use the upload file command to upload files in WebDriverIO. |
GitHub & NPM Stats | As of August 24, 2022, Cypress has 40.2K Stars, 2.5K Forks, Weekly Download - 4,136,305 | As of August 24, 2022, WebDriverIO has 7.7K Stars, 2.2K Forks, and Weekly Download: 1,047,235 |
Cloud Support | All popular cloud vendors support Cypress. | Using on-demand services like Sauce Labs, Browserstack, TestingBot, CrossBrowserTesting, LambdaTest, or Perfecto with WebdriverIO is pretty simple. |
Hover Support | There is a workaround for this in Cypress. The issue with Cypress hovers command is still open. | You can perform mouse hover in WebDriverIO using the move to method. |
Installation & Configuration | Cypress is easy to install and configure and has a pre-defined folder structure. It's a complete package that comes bundled with its test runner. | Installing WebDriverIO is easy. It does not define any pre-defined folder structure. |
iFrame Support | Cypress iFrame support is limited and challenging. You can add iFrame support using the plugin. | In WebDriverIO, you can handle iFrame easily. |
Locators | In Cypress, for XPath, you need to install the plugin. | WebDriverIO has built-in support for CSS, XPath, Android, iOS, React, and other selectors. |
Mobile Automation | Cypress is not a tool for mobile automation. | WebDriverIO has good support for mobile automation. |
Multiple Domains | Handling multiple domains was not easy earlier with Cypress. With version 9.6.0, they have added the origin command. | It is easy to handle multiple domains in WebDriverIO. |
Multiple Windows Support | In Cypress, to handle multiple windows, you need to use a workaround that does not replicate the same scenario, just like the end user. | Handling multiple windows in WebDriverIO is easy as it is in Selenium. |
Network Control | With Cypress, testers can stub network traffic as needed, which helps to test edge case scenarios. | Network control / Network interception is challenging in Webdriver. |
Origin | The initial release for Cypress was in 2014, and it is a stable tool now. | WebDriverIO is also a stable tool, with its first release in 2013. |
Page Object Model | Cypress suggests you stop using page objects and recommend using app actions. | Version 5 of WebdriverIO was designed with Page Object Pattern support in mind. |
Parallelization | It is costly to implement parallelization in Cypress. Also, to run the parallel test, you need to split the tests into files. You can not run a test against multiple browsers at the same time. | WebdriverIO allows you to run your tests with maximum concurrency, meaning that no matter how many files and tests you have, they can run in parallel. |
Plugins | Automation in Cypress requires using many third-party plugins, which can get outdated with version upgrades. | WebdriverIO automation is not much dependent on plugins. |
Reporting Tools | Reporting tools used with Cypress are Mocha Awesome, Allure, and Cucumber reporting. | WebDriverIO supports integration with many reporting tools, including allure, jasmine spec, cucumber, etc. |
Screenshot | Cypress has built-in support for screenshot capturing. | In WebDriverIO, You can use the save screenshot method and save at your desired location. |
Script Execution Speed | Cypress is Faster compared to WebDriver IO. | Script Execution is slower in WebDriverIO compared to Cypress. |
Spies, Stubs and Clocks | Cypress provides the feature to verify, analyze, and control server responses, timers, and functions. | WebDriverO has built-in support for mocks and spies limited to the chrome browser. |
Supported Languages | Cypress supports JavaScript and TypeScript. | WebDriverIO also supports JavaScript and TypeScript. |
Syntax | Cypress syntax is more similar to JQuery; instead of JQuery $, it uses the keyword cy with many JQuery commands. | Good JavaScript knowledge is required to work with WebDriver IO. |
Test Framework | Cypress supports Mocha and Cucumber. | WebDriver IO supports Mocha, Cucucumber and Jasmine. |
Test Runner | Cypress has Interactive Test Runner. | WebDriverIO has CLI Runner. |
Video Recording | Cypress has Built-in support for video recording. | In WebDriverIO, you can do video recording using 3rd party plugin. |
- Log in to post comments