Skip to content

Commit 4b52e9a

Browse files
committed
Include browserBinary() in doc for 6.0.0 release
1 parent f260895 commit 4b52e9a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77
- Support ARM64 Docker images (seleniarm)
88
- Use PowerShell commands to discover browser versions in Windows
99
- Support for geckodriver snap in Linux
10+
- Include browserBinary() method in WebDriverManager API
1011

1112
### Fixed
1213
- Fix required options in Chromium manager
1314
- Fix relation between Opera major version and operadriver
1415

1516
### Changed
16-
- Change default Docker ssh size to 512m
17+
- Change default Docker shm size to 512m
1718
- Change default Docker recording resolution to 1920x1080
1819
- Bump to bonigarcia/novnc:1.2.0
1920
- Improve commands for browser version discovery in Linux

src/doc/asciidoc/index.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ TIP: Although not mandatory, it is highly recommended to use a logger library to
105105
==== Resolution Algorithm
106106
WebDriverManager executes a _resolution algorithm_ when calling to `setup()` in a given manager. You can find all its internal details in the paper https://link.springer.com/article/10.1007/s10664-021-09975-3[Automated driver management for Selenium WebDriver], published in the Springer Journal of Empirical Software Engineering in 2021. The most relevant parts of this algorithm are the following:
107107

108-
1. WebDriverManager tries to find the browser version. To this aim, WebDriverManager uses internally a knowledge database called https://github.com/bonigarcia/webdrivermanager/blob/master/src/main/resources/commands.properties[commands database]. This database is a collection of shell commands used to discover the version of a given browser in the different operating systems (e.g., `google-chrome --version` for Chrome in Linux).
108+
1. WebDriverManager tries to find the browser version. To this aim, WebDriverManager uses internally a knowledge database called https://github.com/bonigarcia/webdrivermanager/blob/master/src/main/resources/commands.properties[commands database]. This database is a collection of shell commands used to discover the version of a given browser in the different operating systems (e.g., `google-chrome --version` for Chrome in Linux). As of WebDriverManager 6.0.0, you can specify the browser binary path (using the method `browserBinary()` ) that WebDriverManager will use for browser version discovery.
109109
2. Using the browser version, WebDriverManager tries to find the proper driver version. This process is different for each browser. For chromedriver, the https://github.com/GoogleChromeLabs/chrome-for-testing[Chrome for Testing (CfT) endpoints] are used. For geckodriver, the https://raw.githubusercontent.com/SeleniumHQ/selenium/trunk/common/geckodriver/geckodriver-support.json[Firefox mapping maintained by the Selenium project] (which is based on the https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html[official geckodriver support]). For msedgedriver, the https://msedgedriver.azureedge.net/[Edge metadata] is used.
110110
3. Once the driver version is discovered, WebDriverManager downloads this driver to a local cache (located at `~/.cache/selenium` by default). These drivers are reused in subsequent calls.
111111
4. Finally, WebDriverManager exports the driver path using Java system properties (e.g., `webdriver.chrome.driver` in the case of the Chrome manager).
@@ -627,6 +627,7 @@ The remainder of this section describes all the possible Java methods in the Web
627627
|`resolutionCachePath(String)`|`wdm.resolutionCachePath`|`~/.cache/selenium`|Folder to store the resolution cache
628628
|`driverVersion(String)`|`wdm.chromeDriverVersion`, `wdm.operaDriverVersion`, `wdm.iExplorerDriverVersion`, `wdm.edgeDriverVersion`, `wdm.geckoDriverVersion`, `wdm.chromiumDriverVersion`|`""` (automatic driver version discovery through the <<resolution-algorithm,resolution algorithm>>)|Custom driver version
629629
|`browserVersion(String)`|`wdm.chromeVersion`, `wdm.operaVersion`, `wdm.edgeVersion`, `wdm.firefoxVersion`, `wdm.chromiumVersion`, `wdm.safariVersion`|`""` (automatic browser version detection using the https://github.com/bonigarcia/webdrivermanager/blob/master/src/main/resources/commands.properties[commands database])|Custom browser version (major)
630+
|`browserBinary(String)`|`wdm.chromeBinary`, `wdm.operaBinary`, `wdm.edgeBinary`, `wdm.firefoxBinary`, `wdm.chromiumBinary`|`""` (automatic browser version detection using the default browser locations as specified in the https://github.com/bonigarcia/webdrivermanager/blob/master/src/main/resources/commands.properties[commands database])|Custom browser binary path
630631
|`forceDownload()`|`wdm.forceDownload=true`|`false` (drivers in cache are reused if available)|Force downloading driver (even if it is already in the cache)
631632
|`useBetaVersions()`|`wdm.useBetaVersions=true`|`false` (driver versions are skipped)|Allow the use beta versions (if possible)
632633
|`architecture(Architecture)`|`wdm.architecture`|`""` (automatic architecture discovery)|Force a given architecture for a driver
@@ -860,7 +861,7 @@ include::sponsors.html[]
860861
endif::[]
861862

862863
== Further Documentation
863-
There are other resources related to Selenium-Jupiter and automated testing you can find helpful. For instance, the following books:
864+
There are other resources related to WebDriverManager and automated testing you can find helpful. For instance, the following books:
864865

865866
* García, Boni. https://www.oreilly.com/library/view/hands-on-selenium-webdriver/9781098109998/[Hands-On Selenium WebDriver with Java]. _O'Reilly Media, Inc._, 2022.
866867
* García, Boni. https://www.amazon.com/Mastering-Software-Testing-JUnit-Comprehensive-ebook/dp/B076ZQCK5Q/[Mastering Software Testing with JUnit 5]. _Packt Publishing Ltd_, 2017.

0 commit comments

Comments
 (0)