From 25e3bfee638d75edf49aaf4203a654aa530e544b Mon Sep 17 00:00:00 2001 From: Simon Benzer Date: Thu, 17 Oct 2024 17:49:13 -0400 Subject: [PATCH 1/7] Throw Error When Using Unsupported Linux ARM --- java/src/org/openqa/selenium/manager/SeleniumManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index 2c7acdbc9f1b5..d4916195a1719 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -194,7 +194,11 @@ private synchronized Path getBinary() { } else if (current.is(MAC)) { folder = "macos"; } else if (current.is(LINUX)) { + if (System.getProperty("os.arch").contains("arm")) { + throw new WebDriverException("Linux ARM64= is not supported by Selenium Manager"); + } else { folder = "linux"; + } } else if (current.is(UNIX)) { LOG.warning( String.format( From eddc986e894cc31bfd25cb8c26ca5286e920f53e Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Thu, 17 Oct 2024 19:13:48 -0400 Subject: [PATCH 2/7] Update SeleniumManager.java --- java/src/org/openqa/selenium/manager/SeleniumManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index d4916195a1719..fa4fc03bb0b1e 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -195,7 +195,7 @@ private synchronized Path getBinary() { folder = "macos"; } else if (current.is(LINUX)) { if (System.getProperty("os.arch").contains("arm")) { - throw new WebDriverException("Linux ARM64= is not supported by Selenium Manager"); + throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); } else { folder = "linux"; } From 04f04c50b4efbd944e3d0b424c3c7cacb7e21ec9 Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:01:58 -0400 Subject: [PATCH 3/7] fixed formatting --- .../org/openqa/selenium/manager/SeleniumManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index fa4fc03bb0b1e..e946b8e3e3e10 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -194,11 +194,11 @@ private synchronized Path getBinary() { } else if (current.is(MAC)) { folder = "macos"; } else if (current.is(LINUX)) { - if (System.getProperty("os.arch").contains("arm")) { - throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); - } else { - folder = "linux"; - } + if (System.getProperty("os.arch").contains("arm")) { + throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); + } else { + folder = "linux"; + } } else if (current.is(UNIX)) { LOG.warning( String.format( From a7be622d211bc30720b9dfe0857a4776be49b558 Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:13:08 -0400 Subject: [PATCH 4/7] fixed formatting - my bad --- java/src/org/openqa/selenium/manager/SeleniumManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index e946b8e3e3e10..67d250c522822 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -48,7 +48,7 @@ *

The Selenium-Manager binaries are distributed in a JAR file * (org.openqa.selenium:selenium-manager) for the Java binding language. Since these binaries are * compressed within these JAR, we need to serialize the proper binary for the current platform - * (Windows, macOS, or Linux) as an executable file. To implement this we use a singleton pattern, + * (Windows, macOS, or ) as an executable file. To implement this we use a singleton pattern, * since this way, we have a single instance in the JVM, and we reuse the resulting binary for all * the calls to the Selenium Manager singleton during all the Java process lifetime, deleting the * binary (stored as a local temporal file) on runtime shutdown. @@ -193,11 +193,11 @@ private synchronized Path getBinary() { folder = "windows"; } else if (current.is(MAC)) { folder = "macos"; - } else if (current.is(LINUX)) { + } else if (current.is()) { if (System.getProperty("os.arch").contains("arm")) { throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); } else { - folder = "linux"; + folder = "linux"; } } else if (current.is(UNIX)) { LOG.warning( From cb89f97e701cdfbc80cd7f7392bfb03dd8836340 Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:14:38 -0400 Subject: [PATCH 5/7] Update SeleniumManager.java --- java/src/org/openqa/selenium/manager/SeleniumManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index 67d250c522822..868a433fb71e9 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -193,7 +193,7 @@ private synchronized Path getBinary() { folder = "windows"; } else if (current.is(MAC)) { folder = "macos"; - } else if (current.is()) { + } else if (current.is(LINUX)) { if (System.getProperty("os.arch").contains("arm")) { throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); } else { From 37cd813a6380239bf1b888a8991e069a69080a2f Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:16:41 -0400 Subject: [PATCH 6/7] Update SeleniumManager.java --- .../org/openqa/selenium/manager/SeleniumManager.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index 868a433fb71e9..bbe0786c046de 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -194,11 +194,11 @@ private synchronized Path getBinary() { } else if (current.is(MAC)) { folder = "macos"; } else if (current.is(LINUX)) { - if (System.getProperty("os.arch").contains("arm")) { - throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); - } else { - folder = "linux"; - } + if (System.getProperty("os.arch").contains("arm")) { + throw new WebDriverException("Linux ARM is not supported by Selenium Manager"); + } else { + folder = "linux"; + } } else if (current.is(UNIX)) { LOG.warning( String.format( From bbe46a1992d6de07abc8724c23538411b71b0a45 Mon Sep 17 00:00:00 2001 From: Simon Benzer <69980130+shbenzer@users.noreply.github.com> Date: Wed, 23 Oct 2024 10:48:45 -0400 Subject: [PATCH 7/7] Update SeleniumManager.java --- java/src/org/openqa/selenium/manager/SeleniumManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/org/openqa/selenium/manager/SeleniumManager.java b/java/src/org/openqa/selenium/manager/SeleniumManager.java index bbe0786c046de..f212b2b899d05 100644 --- a/java/src/org/openqa/selenium/manager/SeleniumManager.java +++ b/java/src/org/openqa/selenium/manager/SeleniumManager.java @@ -48,7 +48,7 @@ *

The Selenium-Manager binaries are distributed in a JAR file * (org.openqa.selenium:selenium-manager) for the Java binding language. Since these binaries are * compressed within these JAR, we need to serialize the proper binary for the current platform - * (Windows, macOS, or ) as an executable file. To implement this we use a singleton pattern, + * (Windows, macOS, or Linux) as an executable file. To implement this we use a singleton pattern, * since this way, we have a single instance in the JVM, and we reuse the resulting binary for all * the calls to the Selenium Manager singleton during all the Java process lifetime, deleting the * binary (stored as a local temporal file) on runtime shutdown.