Appendix B. Driver Management
As discussed in Chapter 1, driver management involves three steps: download, setup, and maintenance. Manual driver management is costly in terms of effort and potentially problematic regarding maintainability. For this reason, I use WebDriverManager to carry out this process in an automated and automaintained manner in all the examples of this book. For completeness, this appendix also describes the involved steps (download, setup, and maintenance) in manual driver management.
WebDriverManager: Automated Driver Management
WebDriverManager is an open source Java library that manages the drivers required by Selenium WebDriver (e.g., chromedriver, geckodriver, msedgedriver, etc.) in an automated manner. WebDriverManager provides a set of managers for different browsers, namely Chrome, Firefox, Edge, Opera, Chromium, and Internet Explorer.
WebDriverManager internally executes a resolution algorithm to manage the drivers required by each browser. This algorithm aims to automatically discover, download, set up, and maintain these drivers.
Figure B-1 represents this algorithm in the context of the methodology implemented by WebDriverManager. For each manager (e.g., chromedriver()
, firefoxdriver()
, etc.), the resolution algorithm works as follows:
-
WebDriverManager tries to find the browser version (e.g., Chrome) installed in the local machine. For that, it uses an internal knowledge database called commands database. This database contains a list of ...
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.