@@ -0,0 +1,2298 @@
+/*%0A * (C) Copyright 2022 Boni Garcia (https://bonigarcia.github.io/)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *   http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0Apackage io.github.bonigarcia.wdm.test.chrome;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0Aimport static org.assertj.core.api.Assumptions.assumeThat;%0A%0Aimport java.io.File;%0A%0Aimport org.junit.jupiter.api.AfterEach;%0Aimport org.junit.jupiter.api.BeforeAll;%0Aimport org.junit.jupiter.api.BeforeEach;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.openqa.selenium.WebDriver;%0Aimport org.openqa.selenium.chrome.ChromeDriver;%0Aimport org.openqa.selenium.chrome.ChromeOptions;%0A%0Aimport io.github.bonigarcia.wdm.WebDriverManager;%0A%0A/**%0A * Test with Google Chrome beta in Windows.%0A *%0A * @author Boni Garcia%0A * @since 5.1.0%0A */%0Aclass ChromeBetaWindowsTest %7B%0A%0A    static String chromeBetaPath = %22C:%5C%5C%5C%5CPROGRA~1%5C%5C%5C%5CGOOGLE%5C%5C%5C%5CCHROME~1%5C%5C%5C%5CAPPLIC~1%5C%5C%5C%5CCHROME.EXE%22;%0A    static File chromeBetaFile = new File(chromeBetaPath);%0A%0A    WebDriver driver;%0A%0A    @BeforeAll%0A    static void setupClass() %7B%0A        assumeThat(chromeBetaFile).exists();%0A        String chromeBetaCommand = String.format(%0A                %22cmd.exe /C wmic datafile where name=%5C%22%25s%5C%22 get Version /value%22,%0A                chromeBetaPath);%0A        WebDriverManager.chromedriver()%0A                .browserVersionDetectionCommand(chromeBetaCommand).setup();%0A    %7D%0A%0A    @BeforeEach%0A    void setupTest() %7B%0A        ChromeOptions chromeOptions = new ChromeOptions();%0A        chromeOptions.setBinary(chromeBetaPath);%0A        driver = new ChromeDriver(chromeOptions);%0A    %7D%0A%0A    @AfterEach%0A    void teardown() %7B%0A        driver.quit();%0A    %7D%0A%0A    @Test%0A    void test() %7B%0A        driver.get(%22https://bonigarcia.dev/selenium-webdriver-java/%22);%0A        assertThat(driver.getTitle()).contains(%22Selenium WebDriver%22);%0A    %7D%0A%0A%7D%0A

Include test using Chrome Beta in Windows