Back to Resources

Blog

Posted May 1, 2023

WebdriverIO v8 Release

Learn about what's new in WebdriverIO v8.

quote

The primary goal for the new version of WebdriverIO was to transition from CommonJS to ESM in order to continue with important dependency updates and avoid security issues. Furthermore, we cleaned up some code, implemented a new Action API interface and streamlined the way WebdriverIO deals with global objects using the test runner.

Read the WebdriverIO blog post to see which changes you will need to make to upgrade to v8, but in most cases no updates are necessary.

What's new in WebdriverIO 8, Christian Bromann
Christian Bromann joins Nikolay to talk about what’s new in WebDriverIO 8 and how to get started.

Here we’ll outline the changes in this new version.

Node.js v12, v13, and v14 No Longer Supported 

While you can continue using Node.js v14, we recommend updating to Node.js v16 or v18 directly. See how to update in the WebdriverIO blog.

Transition from CommonJS to ESM

This transition required updates to all module imports, transitioning from Jest to Vitest as a unit test framework and rewriting of various parts within the code base. While this affected all files, it should not affect your work, as CommonJS is still supported.

New Runner for Unit and Component Testing in the Browser

The new browser runner allows you to load and execute tests within the browser rather than in Node.js. This will allow you to enable a more realistic user interaction with your components compared to emitting them through JavaScript.

Read the WebdriverIO blog to learn how you can use the Testing Library for rendering and fetching elements while using WebdriverIO for interacting with components.

New Action Interface

With this latest release, there is a new interface that makes executing various actions much easier. Two new browser commands–action and actions–make it much simpler and type-safe to run the right action.

WebDriver BiDi Support

Since WebdriverIO is based on the WebDriver protocol–a web standard for automating browsers–you can run tests in browsers that are used by your users rather than in a browser engine. 

With this release, users can access the new protocol features as they become available in browsers.

For more information on browser development to ensure features work as expected using a lean user interface, watch my talk on The Evolution of Browser Automation.

Optional Globals

Attaching objects to the global scope is not a best practice and can cause side effects when other modules do the same. Therefore with v8, it’s now up to the user whether they want to continue to attach these objects and methods to the global scope or import them directly.

Miscellaneous Updates

The documentation has been improved and new API docs have been introduced. Additionally, the config property was removed from the browser object and the behavior of relative spec and exclude paths has been fixed, and support for tsconfig-paths was removed.

To see all of the details of this latest release, visit the WebdriverIO blog.

This post was first published in December 2022.

Head over to our docs or get in touch to learn more

Why stop here?

© 2023 Sauce Labs Inc., all rights reserved. SAUCE and SAUCE LABS are registered trademarks owned by Sauce Labs Inc. in the United States, EU, and may be registered in other jurisdictions.