Cypress Vs WebDriverIO

Profile picture for user devraj

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:

FeatureCypressWebDriverIO
ArchitectureCypress 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 TestingCypress has built-in support for making requests to servers.In WebDriverIO, API testing is possible using 3rd party libraries like wdio-intercept-service.
AssertionsCypress bundles the popular Chai assertion library.WDIO test runner comes with a built-in assertion library expect-webdriverio inspired by the expect library.
Aynch/AwaitIn 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 WaitsIn 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 SupportedCypress 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 IntegrationCypress 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 & DocumentationCypress is well documented and has an excellent community and paid support.    WebDriverIO has good community support and documentation.
CostCypress 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.
DashboardCypress has an excellent dashboard to view reports, analytics, recording, and debugging.   No such feature in WebDriverIO.
DebuggingCypress 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 DropDrag and Drop require plugins or custom coding in Cypress.WebDriverIO has the inbuilt command DragAndDrop.
File UploadFile Upload in Cypress requires a plugin.You can use the upload file command to upload files in WebDriverIO.
GitHub & NPM StatsAs 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 SupportAll popular cloud vendors support Cypress.Using on-demand services like Sauce Labs, Browserstack, TestingBot, CrossBrowserTesting, LambdaTest, or Perfecto with WebdriverIO is pretty simple.
Hover SupportThere 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 & ConfigurationCypress 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 SupportCypress iFrame support is limited and challenging. You can add iFrame support using the plugin.In WebDriverIO, you can handle iFrame easily.
LocatorsIn Cypress, for XPath, you need to install the plugin.WebDriverIO has built-in support for CSS, XPath, Android, iOS, React, and other selectors. 
Mobile AutomationCypress is not a tool for mobile automation.WebDriverIO has good support for mobile automation.
Multiple DomainsHandling 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 SupportIn 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 ControlWith Cypress, testers can stub network traffic as needed, which helps to test edge case scenarios.Network control / Network interception is challenging in Webdriver.
OriginThe 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 ModelCypress suggests you stop using page objects and recommend using app actions.Version 5 of WebdriverIO was designed with Page Object Pattern support in mind.
ParallelizationIt 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.
PluginsAutomation in Cypress requires using many third-party plugins, which can get outdated with version upgrades.WebdriverIO automation is not much dependent on plugins.
Reporting ToolsReporting tools used with Cypress are Mocha Awesome, Allure, and Cucumber reporting.WebDriverIO supports integration with many reporting tools, including allure, jasmine spec, cucumber, etc.
ScreenshotCypress has built-in support for screenshot capturing.In WebDriverIO, You can use the save screenshot method and save at your desired location.
Script Execution SpeedCypress is Faster compared to WebDriver IO.Script Execution is slower in WebDriverIO compared to Cypress.
Spies, Stubs and ClocksCypress 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 LanguagesCypress supports JavaScript and TypeScript.WebDriverIO also supports JavaScript and TypeScript.
SyntaxCypress 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 FrameworkCypress supports Mocha and Cucumber.WebDriver IO supports Mocha, Cucucumber and Jasmine.
Test RunnerCypress has Interactive Test Runner.WebDriverIO has CLI Runner.
Video RecordingCypress has Built-in support for video recording.In WebDriverIO, you can do video recording using 3rd party plugin.