@@ -0,0 +1,2337 @@
+/*%0D%0A * (C) Copyright 2021 Boni Garcia (https://bonigarcia.github.io/)%0D%0A *%0D%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0D%0A * you may not use this file except in compliance with the License.%0D%0A * You may obtain a copy of the License at%0D%0A *%0D%0A *   http://www.apache.org/licenses/LICENSE-2.0%0D%0A *%0D%0A * Unless required by applicable law or agreed to in writing, software%0D%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0D%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0D%0A * See the License for the specific language governing permissions and%0D%0A * limitations under the License.%0D%0A *%0D%0A */%0D%0Apackage io.github.bonigarcia.seljup.test.template;%0D%0A%0D%0Aimport static org.assertj.core.api.Assertions.assertThat;%0D%0A%0D%0Aimport java.time.Duration;%0D%0A%0D%0Aimport org.junit.jupiter.api.BeforeAll;%0D%0Aimport org.junit.jupiter.api.TestTemplate;%0D%0Aimport org.junit.jupiter.api.extension.RegisterExtension;%0D%0Aimport org.openqa.selenium.By;%0D%0Aimport org.openqa.selenium.WebDriver;%0D%0Aimport org.openqa.selenium.chrome.ChromeOptions;%0D%0A%0D%0Aimport io.github.bonigarcia.seljup.BrowserBuilder;%0D%0Aimport io.github.bonigarcia.seljup.Options;%0D%0Aimport io.github.bonigarcia.seljup.BrowsersTemplate.Browser;%0D%0Aimport io.github.bonigarcia.seljup.SeleniumJupiter;%0D%0A%0D%0Aclass TemplateRegisterOptionsTest %7B%0D%0A%0D%0A    @RegisterExtension%0D%0A    static SeleniumJupiter seleniumJupiter = new SeleniumJupiter();%0D%0A%0D%0A    @Options%0D%0A    static ChromeOptions chromeOptions = new ChromeOptions();%0D%0A%0D%0A    @BeforeAll%0D%0A    static void setup() %7B%0D%0A        chromeOptions.addArguments(%22--use-fake-device-for-media-stream%22,%0D%0A                %22--use-fake-ui-for-media-stream%22);%0D%0A%0D%0A        Browser chrome = BrowserBuilder.chrome().build();%0D%0A        Browser chromeInDocker = BrowserBuilder.chromeInDocker().build();%0D%0A        seleniumJupiter.addBrowsers(chrome);%0D%0A        seleniumJupiter.addBrowsers(chromeInDocker);%0D%0A%0D%0A        seleniumJupiter.getConfig().enableScreenshot();%0D%0A    %7D%0D%0A%0D%0A    @TestTemplate%0D%0A    void templateTest(WebDriver driver) throws InterruptedException %7B%0D%0A        driver.get(%0D%0A                %22https://webrtc.github.io/samples/src/content/devices/input-output/%22);%0D%0A        assertThat(driver.findElement(By.id(%22video%22)).getTagName())%0D%0A                .isEqualTo(%22video%22);%0D%0A%0D%0A        Thread.sleep(Duration.ofSeconds(5).toMillis());%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Include template test using options (issue #191)