BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News WebDriverIO Version 6 Release Adds Native Chrome DevTools Automation Protocol Support

WebDriverIO Version 6 Release Adds Native Chrome DevTools Automation Protocol Support

This item in japanese

The recent release of WebDriverIO version 6, a browser test automation framework for Node.js, adds Chrome DevTools protocol testing to its existing support for WebDriver and makes it easier to leverage tools like Puppeteer and Cypress.io.

When running tests via a local test script, developers no longer need to download a browser driver. WebdriverIO checks if a browser driver is running and accessible and uses Puppeteer as a fallback if not. The WebDriverIO remains the same, whether leveraging WebDriver or Puppeteer. However, Puppeteer support only works for running tests locally and when the browser exists on the same machine as the tests.

While WebDriver provides true cross-browser testing, Puppeteer currently supports Chromium-based browsers, and Firefox nightly builds. The WebDriverIO team is following work on Playwright, which offers true cross-browser support. Currently Playwright remains an integration challenge for projects like WebDriverIO as Playwright requires a custom browser built for Firefox and Safari support.

And though WebDriverIO has added support for an alternative automation protocol, the project remains confident that eventually, a new WebDriver standard will emerge to reunify efforts in browser automation protocols.

WebDriverIO version 6 should be a straightforward upgrade for users of WebDriver IO version 5. A key breaking change is that Node.js version 8 is no longer supported, and users are encouraged to upgrade to Node.js version 12 at this time. The project also introduces a few breaking command-line interface changes. Users of TypeScript will receive notifications of which APIs have changed.

WebDriverIO adds several performance improvements with the version 6 release. Beyond the benefits of running Puppeteer locally, the project removed its dependency on request and switching to got, shrinking the bundle size of WebDriverIO by 75%. Other internal improvements to the WebDriverIO 6 codebase result in faster test execution and lower CPU and memory consumption.

The WebDriverIO 6 release also introduces a new assertion library inspired by Jest's expect package with features including waiting for an expectation to succeed and built-in types of TypeScript and JS autocompletion.

The WebDriverIO community creates a series of services and reporters for more test integration and reporting flexibility.

Read the complete WebDriverIO 6 release article for more information on additional changes and improvements to the project.

The JavaScript ecosystem offers many options for testing in a variety of different approaches, though relatively few feature-complete packages for cross-browser functional testing. Another primary actively maintained alternative to WebDriverIO is Intern. Both Intern and WebDriverIO are open-source projects that are part of the OpenJS Foundation. Beyond these testing frameworks, many developers today choose to leverage Jest and Cypress.io and minimize their cross-browser testing. Many Angular developers continue to prefer Protractor + Karma for testing Angular applications. More coverage on the testing ecosystem is available in the JavaScript and Web Development InfoQ Trends Report.

WebDriverIO is open-source software available under the MIT license. Contributions are welcome via the WebDriverIO contribution guidelines and code of conduct.

Rate this Article

Adoption
Style

BT