Skip to content

Commit 8ff5a11

Browse files
committed
[py] WIP - Support ARM binary selection for Selenium Manager
1 parent bc88096 commit 8ff5a11

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

py/selenium/webdriver/common/selenium_manager.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
1718
import json
1819
import logging
1920
import os
@@ -77,14 +78,19 @@ def _get_binary() -> Path:
7778
else:
7879
allowed = {
7980
("darwin", "any"): "macos/selenium-manager",
80-
("win32", "any"): "windows/selenium-manager.exe",
81-
("cygwin", "any"): "windows/selenium-manager.exe",
81+
("win32", "amd64"): "windows/selenium-manager.exe",
82+
("win32", "arm64"): "windows/selenium-manager-arm64.exe",
83+
("cygwin", "amd64"): "windows/selenium-manager.exe",
84+
("cygwin", "arm64"): "windows/selenium-manager-arm64.exe",
8285
("linux", "x86_64"): "linux/selenium-manager",
86+
("linux", "arm64"): "linux/selenium-manager-arm64",
8387
("freebsd", "x86_64"): "linux/selenium-manager",
88+
("freebsd", "arm64"): "linux/selenium-manager-arm64",
8489
("openbsd", "x86_64"): "linux/selenium-manager",
90+
("openbsd", "arm64"): "linux/selenium-manager-arm64",
8591
}
8692

87-
arch = platform.machine() if sys.platform in ("linux", "freebsd", "openbsd") else "any"
93+
arch = "any" if sys.platform == "darwin" else platform.machine().lower()
8894
if sys.platform in ["freebsd", "openbsd"]:
8995
logger.warning("Selenium Manager binary may not be compatible with %s; verify settings", sys.platform)
9096

0 commit comments

Comments
 (0)