@@ -0,0 +1,2035 @@
+/*%0A * (C) Copyright 2017 Boni Garcia (http://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.test.advance;%0A%0A//tag::snippet-in-doc%5B%5D%0Aimport static org.junit.jupiter.api.Assertions.assertTrue;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A// tag::snippet-in-doc%5B%5D%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.api.extension.ExtendWith;%0Aimport org.openqa.selenium.chrome.ChromeDriver;%0Aimport org.openqa.selenium.chrome.ChromeOptions;%0Aimport org.openqa.selenium.remote.DesiredCapabilities;%0A%0Aimport io.github.bonigarcia.DriverCapabilities;%0Aimport io.github.bonigarcia.SeleniumExtension;%0A%0A@ExtendWith(SeleniumExtension.class)%0Apublic class ChromeWithGlobalCapabilitiesJupiterTest %7B%0A%0A    @DriverCapabilities%0A    DesiredCapabilities capabilities = DesiredCapabilities.chrome();%0A    %7B%0A        Map%3CString, String%3E mobileEmulation = new HashMap%3CString, String%3E();%0A        mobileEmulation.put(%22deviceName%22, %22Nexus 5%22);%0A        Map%3CString, Object%3E chromeOptions = new HashMap%3CString, Object%3E();%0A        chromeOptions.put(%22mobileEmulation%22, mobileEmulation);%0A        capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);%0A    %7D%0A%0A    @Test%0A    void webrtcTest1(ChromeDriver chrome) throws InterruptedException %7B%0A        chrome.get(%22https://bonigarcia.github.io/selenium-jupiter/%22);%0A%0A        assertTrue(chrome.getTitle().startsWith(%22selenium-jupiter%22));%0A%0A        Thread.sleep(1500); // Wait 1.5 seconds to see the page%0A    %7D%0A%0A%7D%0A// end::snippet-in-doc%5B%5D%0A

Include test using Chrome and global capabilities (mobile emulation)