Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Projects

WebdriverIO v9 Now Available


WebdriverIO v9 is now available! With this release, WebdriverIO offers much greater automation capabilities than ever before thanks to the new WebDriver Bidi protocol.

WebdriverIO v9 is now available! With this release, WebdriverIO offers much greater automation capabilities than ever before thanks to the new WebDriver Bidi protocol. With WebdriverIO v9 we have been working to be at the forefront of adopters of this new era and allow you to leverage the power of the protocol first.

For a full list of updates and changes, we encourage you to check out the Official WebdriverIO blog!

New Updates for v9

The majority of the new features in v9 are enabled by the WebDriver Bidi capabilities now available in browsers. Upon upgrading to v9, all sessions will automatically use Bidi unless you explicitly disable it via the new wdio:enforceWebDriverClassic capability. However, these features unfortunately won't be available to you if your remote environment doesn't support WebDriver Bidi. You can check if Bidi is supported in your session by looking into the browser.isBidi property.

  • New url Command Parameters: The url command has evolved from a simple navigation tool to a powerful feature-packed command.
  • Passing in Custom Headers: You can now pass custom headers that will be applied when the browser makes a request.
  • Overcome Basic Authentication: You can now automate user authentication via basic authentication.
  • Running an Initialization Script: Inject JavaScript before anything loads on the website using the beforeLoad parameter.
  • Cross Browser Request Mocking: This enhancement allows modifying requests before they go out to the network.
  • Automatic Shadow Root Piercing: Testing applications with Web Components is now seamless with automatic shadow root piercing.
  • Improved Argument Serialization: With WebDriver Bidi we are now able to do a better job transforming non-serializable data objects to be used in the browser as the object that it is.
  • Setting Viewports: WebdriverIO v9 introduces the setViewport command, enabling you to adjust the application’s viewport to any size, including modifying the devicePixelRatio.

Notable Breaking Changes

We strive to minimize breaking changes to avoid requiring significant time for upgrades to the latest version of WebdriverIO. However, major releases offer an opportunity to remove deprecated interfaces that we no longer recommend using, including:

  • Accessing Element Properties: You may have accessed some of these element properties, such as evaluating the selector via $('elem').selector or getting its reference via $('elem').elementId, among others. These properties are no longer accessible in this manner. Instead, you need to call getElement to access properties of WebdriverIO.Element and getElements to access properties for a WebdriverIO.ElementArray. 
  • Removal of XXXContaining Matcher: To reduce the number of matchers we maintain, we have decided to remove our custom XXXContaining matchers in favor of using these asymmetric matchers.
  • Removal of devtools and @wdio/devtools-service Packages: As this functionality is no longer needed, we have decided to remove the devtools package along with the automationProtocol option.

Project Updates

While we have been diligently adding new features to make WebdriverIO more effective for testing web and mobile applications, we have also been focusing on several internal initiatives to ensure a bright future for the project, including:

  • pnpm Migration
  • Esbuild Migration
  • Migration from ts-node to tsx
  • Dropping Node.js v16 Support

What's Next?

As WebdriverIO celebrates its 13th year of development, the need for new testing capabilities continues to grow alongside the evolving testing industry and web standards. WebdriverIO will continue to integrate more WebDriver Bidi features to build powerful new functionalities. 

Big thank you to our WebdriverIO team for their work on this release! Interested in learning more? Join the WebdriverIO team’s Open Office Hours.