Skip to Main Content
Hands-On Selenium WebDriver with Java
book

Hands-On Selenium WebDriver with Java

by Boni Garcia
March 2022
Intermediate to advanced content levelIntermediate to advanced
419 pages
9h 59m
English
O'Reilly Media, Inc.
Book available
Content preview from Hands-On Selenium WebDriver with Java

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:

  1. 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 shell ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Selenium WebDriver with Java - Basics to Advanced and Frameworks

Selenium WebDriver with Java - Basics to Advanced and Frameworks

Rahul Shetty

Publisher Resources

ISBN: 9781098109998Errata PageSupplemental Content