Appendix A. Whatâs New in Selenium 4
This appendix provides a summary of the novelties available in Selenium 4. The aim of this content is twofold. First, it enumerates the new features in the core components of the Selenium suite (i.e., WebDriver, Driver, and IDE), providing a link to the book chapter that explains each aspect. In addition, this appendix describes other aspects of the Selenium project that changed with Selenium 4, such as documentation and governance. The second objective is to identify the deprecated parts and the corresponding new features when migrating from Selenium 3 to 4.
Selenium WebDriver
The first stable version of Selenium WebDriver 4.0.0 was released on October 13, 2021. Table A-1 summarizes the most relevant new features in this version compared with the former stable version (i.e., Selenium WebDriver 3.141.59).
Feature | Description | Chapter | Section |
---|---|---|---|
Full adoption of W3C WebDriver |
Standard communication protocol between the Selenium WebDriver API and the drivers |
||
Relative locators |
Location strategy based on the proximity of other web elements |
||
Pinned scripts |
Attach a piece of JavaScript to a WebDriver session |
||
Element screenshots |
Capture screenshots of web elements (instead of the entire page) |
||
Shadow DOM |
Seamless access to a shadow tree |
Get Hands-On Selenium WebDriver with Java now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.