Skip to content

Commit

Permalink
Filter by architecture also in Edge ARM64 (fixes #1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed Oct 31, 2023
1 parent 625e28d commit f4a6f71
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/io/github/bonigarcia/wdm/WebDriverManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
@@ -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();
}

}

0 comments on commit f4a6f71

Please sign in to comment.