Skip to content

Commit 939f815

Browse files
authored
Include blog post about the status of Selenium Manager in October 2023 (releases 0.4.13 and 0.4.14) (SeleniumHQ#1488)
* Include blog post about Selenium Manager 0.4.13 * Rename post about SM 0.4.13 * Update blog post about SM 0.4.13 and 0.4.14 [deploy site]
1 parent 4e2ee4d commit 939f815

File tree

1 file changed

+116
-0
lines changed

1 file changed

+116
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
---
2+
title: "Status of Selenium Manager in October 2023"
3+
linkTitle: "Status of Selenium Manager in October 2023"
4+
date: 2023-10-17
5+
tags: ["selenium", "manager", "edge", "chromium"]
6+
categories: ["releases"]
7+
author: Boni García ([@boni_gg](https://twitter.com/boni_gg))
8+
description: >
9+
This blog post summarizes the novelties introduced in the latest two versions of Selenium Manager (i.e., 0.4.13 and 0.4.14).
10+
---
11+
12+
Selenium Manager continues its development plan. As usual, in the latest releases, i.e., 0.4.13 and 0.4.14 (shipped with Selenium 4.13 and 4.14, respectively), we have fixed the problems reported so far. In these releases, the issues were related to the extraction of the Firefox binary from the self-extracting archive (SFX) in Windows and the advanced configuration through the configuration file (`se-config.toml`) and environment variables (e.g., `SE_BROWSER`). Moreover, these recent releases include new features, as explained below.
13+
14+
### Search for the best driver possible in the cache
15+
By default, Selenium Manager needs to request online endpoints (such as [Chrome for Testing JSON API](https://github.com/GoogleChromeLabs/chrome-for-testing#json-api-endpoints) or [Firefox product-details JSON API](https://wiki.mozilla.org/Release_Management/Product_details)
16+
to discover, download, and maintain the proper drivers and browsers that Selenium requires. The downloaded artifacts are stored in the cache (by default, `~/.cache/selenium`) and reused from there.
17+
18+
To make the driver resolution procedure more robust, as of version 0.4.13, Selenium Manager includes a new feature for locating the drivers in the cache when some error happens. This way, when a network request (or other function) fails in Selenium Manager, it tries to locate the driver in the cache. This characteristic aims to provide a best-effort solution for creating a Selenium session properly, which is the final objective of Selenium Manager. Also, this feature will help to provide a better experience for locating drivers for Selenium Grid.
19+
20+
### Locating Selenium Manager binary with an environment variable
21+
The next feature related to Selenium Manager 0.4.13 has been implemented in the Selenium bindings (i.e., Java, JavaScript, Python, .Net, and Ruby). As of Selenium 4.13.0, the Selenium bindings allow locating the Selenium Manager binary using an environment variable called `SE_MANAGER_PATH`. This way, if this variable is set, the bindings will use its value as the Selenium Manager path in the local filesystem. This feature will allow users to provide a custom compilation of Selenium Manager, for instance, if the default binaries (compiled for Windows, Linux, and macOS) are incompatible with a given system (e.g., ARM64 in Linux).
22+
23+
### Automated Edge management
24+
Selenium Manager 0.4.14 includes automated Edge management. This browser is the last we have in mind for this feature, after Chrome and Firefox.
25+
26+
This feature has been implemented in the same way that Chrome and Firefox for macOS and Linux. In other words, Selenium Manager allows to automatically manage (i.e., discover, downloads, and cache) the latest Edge versions (i.e., stable, beta, dev, canary) and old versions (e.g., 115, 116, etc.). The downloaded binaries, as usual, are stored in the Selenium cache. The following output commands showcase this feature in macOS (first snipped) and Linux (second snippet):
27+
28+
```
29+
./selenium-manager --browser edge --debug --force-browser-download
30+
31+
DEBUG msedgedriver not found in PATH
32+
DEBUG Checking edge releases on https://edgeupdates.microsoft.com/api/products
33+
DEBUG Required browser: edge 117.0.2045.40
34+
DEBUG Downloading edge 117.0.2045.40 from https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/6e65d9ef-0bb9-4636-8d9e-2b1b9d16149d/MicrosoftEdge-117.0.2045.40.pkg
35+
DEBUG edge 117.0.2045.40 has been downloaded at /Users/boni/.cache/selenium/edge/mac64/117.0.2045.40/Microsoft Edge.app/Contents/MacOS/Microsoft Edge
36+
DEBUG Reading msedgedriver version from https://msedgedriver.azureedge.net/LATEST_RELEASE_117_MACOS
37+
DEBUG Required driver: msedgedriver 117.0.2045.40
38+
DEBUG Downloading msedgedriver 117.0.2045.40 from https://msedgedriver.azureedge.net/117.0.2045.40/edgedriver_mac64.zip
39+
INFO Driver path: /Users/boni/.cache/selenium/msedgedriver/mac64/117.0.2045.40/msedgedriver
40+
INFO Browser path: /Users/boni/.cache/selenium/edge/mac64/117.0.2045.40/Microsoft Edge.app/Contents/MacOS/Microsoft Edge
41+
```
42+
43+
```
44+
./selenium-manager --browser edge --debug --browser-version beta
45+
46+
DEBUG msedgedriver not found in PATH
47+
DEBUG edge not found in PATH
48+
DEBUG edge beta not found in the system
49+
DEBUG Checking edge releases on https://edgeupdates.microsoft.com/api/products
50+
DEBUG Required browser: edge 118.0.2088.11
51+
DEBUG Downloading edge 118.0.2088.11 from https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-beta/microsoft-edge-beta_118.0.2088.11-1_amd64.deb
52+
DEBUG edge 118.0.2088.11 has been downloaded at /home/user/.cache/selenium/edge/linux64/118.0.2088.11/msedge
53+
DEBUG Reading msedgedriver version from https://msedgedriver.azureedge.net/LATEST_RELEASE_118_LINUX
54+
DEBUG Required driver: msedgedriver 118.0.2088.11
55+
DEBUG Downloading msedgedriver 118.0.2088.11 from https://msedgedriver.azureedge.net/118.0.2088.11/edgedriver_linux64.zip
56+
INFO Driver path: /home/user/.cache/selenium/msedgedriver/linux64/118.0.2088.11/msedgedriver
57+
INFO Browser path: /home/user/.cache/selenium/edge/linux64/118.0.2088.11/msedge
58+
```
59+
60+
Nevertheless, this feature cannot be implemented similarly for Windows. The reason is that the Edge installer for Windows is distributed as a Microsoft Installer (MSI) file, designed to be executed with administrator rights. We tried to extract the Edge binaries from that MSI file. Still, it seems not possible (see [Stack Overflow post that summarized the problem](https://stackoverflow.com/questions/77132922/extract-parse-resources-from-portable-executable-pe-file)). All in all, the only solution we found is to install Edge in Windows using the MSI installer, and so, administrator grants are required.
61+
62+
This way, when Edge is attempted to be installed with Selenium Manager in Windows with a non-administrator session, a warning message will be displayed as follows:
63+
64+
```
65+
./selenium-manager --debug --browser edge --browser-version beta
66+
67+
DEBUG msedgedriver not found in PATH
68+
DEBUG edge not found in PATH
69+
DEBUG edge beta not found in the system
70+
WARN There was an error managing edge (edge can only be installed in Windows with administrator permissions); using driver found in the cache
71+
INFO Driver path: C:\Users\boni\.cache\selenium\msedgedriver\win64\118.0.2088.17\msedgedriver.exe
72+
```
73+
74+
But when Selenium Manager is executed with administrator grants in Windows, it will be able to automatically discover, download, and install Edge (stable, beta, dev, canary, and older versions):
75+
76+
```
77+
./selenium-manager --debug --browser edge --browser-version beta
78+
79+
DEBUG msedgedriver not found in PATH
80+
DEBUG edge not found in PATH
81+
DEBUG edge beta not found in the system
82+
DEBUG Checking edge releases on https://edgeupdates.microsoft.com/api/products
83+
DEBUG Required browser: edge 118.0.2088.17
84+
DEBUG Downloading edge 118.0.2088.17 from https://msedge.sf.dl.delivery.mp.microsoft.com/filestreamingservice/files/7adec542-f34c-4dea-8e2a-f8c6fab4d2f3/MicrosoftEdgeBetaEnterpriseX64.msi
85+
DEBUG Installing MicrosoftEdgeBetaEnterpriseX64.msi
86+
DEBUG edge 118.0.2088.17 is available at C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe
87+
DEBUG Required driver: msedgedriver 118.0.2088.17
88+
DEBUG msedgedriver 118.0.2088.17 already in the cache
89+
INFO Driver path: C:\Users\boni\.cache\selenium\msedgedriver\win64\118.0.2088.17\msedgedriver.exe
90+
INFO Browser path: C:\Program Files (x86)\Microsoft\Edge Beta\Application\msedge.exe
91+
```
92+
93+
### Chromium support
94+
Chromium is released as portable binaries, distributed as zip files for Windows, Linux, and macOS (see [Chromium download page](https://www.chromium.org/getting-involved/download-chromium/)). Nevertheless, there is a case in which Chromium is actually installed in the system. This happens in Linux systems when installing Chromium through package managers like `atp` or `snap`, for instance, as follows:
95+
96+
```
97+
sudo snap install chromium
98+
```
99+
100+
Therefore, as of 0.4.14, Selenium Manager looks for the Chromium binaries in the PATH when Chrome is not discovered. The following snippet showcases how this feature works in a Linux machine in which Chrome is not available, but Chromium has been installed through `snap`:
101+
102+
```
103+
./selenium-manager --browser chrome --debug
104+
DEBUG chromedriver not found in PATH
105+
DEBUG Found chromium in PATH: /snap/bin/chromium
106+
DEBUG Running command: /snap/bin/chromium --version
107+
DEBUG Output: "Chromium 117.0.5938.149 snap"
108+
DEBUG Detected browser: chrome 117.0.5938.149
109+
DEBUG Required driver: chromedriver 117.0.5938.149
110+
DEBUG chromedriver 117.0.5938.149 already in the cache
111+
INFO Driver path: /home/user/.cache/selenium/chromedriver/linux64/117.0.5938.149/chromedriver
112+
INFO Browser path: /snap/bin/chromium
113+
```
114+
115+
### Next steps
116+
We are close to implementing all the features initially planned for Selenium Manager. You can trace the status of the development activities in the [Selenium Manager project dashboard](https://github.com/orgs/SeleniumHQ/projects/5).

0 commit comments

Comments
 (0)