diff --git a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java index 6eb2ed461..2ea66dbcb 100644 --- a/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java +++ b/src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java @@ -1493,9 +1493,7 @@ protected UrlHandler createUrlHandler(String driverVersion) } // Filter by architecture - if (!isEdgeArm64 || !isMac) { - urlHandler.filterByArch(architecture); - } + urlHandler.filterByArch(architecture); // Rest of filters urlHandler.filterByIgnoredVersions(config().getIgnoreVersions()); diff --git a/src/test/java/io/github/bonigarcia/wdm/test/edge/EdgeMacArmTest.java b/src/test/java/io/github/bonigarcia/wdm/test/edge/EdgeMacArmTest.java new file mode 100644 index 000000000..f3de90311 --- /dev/null +++ b/src/test/java/io/github/bonigarcia/wdm/test/edge/EdgeMacArmTest.java @@ -0,0 +1,52 @@ +/* + * (C) Copyright 2023 Boni Garcia (https://bonigarcia.github.io/) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package io.github.bonigarcia.wdm.test.edge; + +import static java.lang.invoke.MethodHandles.lookup; +import static org.assertj.core.api.Assertions.assertThat; +import static org.slf4j.LoggerFactory.getLogger; + +import java.io.File; + +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; + +import io.github.bonigarcia.wdm.WebDriverManager; + +/** + * Test msedgedriver in Mac OS ARM64. + * + * @author Boni Garcia + * @since 5.6.1 + */ +class EdgeMacArmTest { + + static final Logger log = getLogger(lookup().lookupClass()); + + @Test + void testEdgeMac() { + WebDriverManager wdm = WebDriverManager.edgedriver().mac().arm64() + .avoidBrowserDetection(); + wdm.setup(); + String downloadedDriverPath = wdm.getDownloadedDriverPath(); + + log.debug("The downloaded driver path is: {}", downloadedDriverPath); + File driver = new File(downloadedDriverPath); + assertThat(driver).exists(); + } + +}