@Test public void shouldHaveAndroidConfigWhenAndroidIsEnabled() { config.setAndroidEnabled(true); final Capabilities capabilities = config.createCapabilities(); Map<String, Object> options = (Map<String, Object>) capabilities.getCapability(ChromeOptions.CAPABILITY); assertThat("ChromeOption expected", options, is(notNullValue())); final String androidConfig = (String) options.get("androidPackage"); assertThat(androidConfig, is("com.android.chrome")); }
@Test public void shouldNotHaveChromeOptionsWhenAndroidIsNotEnabled() { config.setAndroidEnabled(false); final Capabilities capabilities = config.createCapabilities(); assertThat(capabilities.getCapability(ChromeOptions.CAPABILITY), is(nullValue())); }
@Test public void shouldHaveProxyInCapability() { final Capabilities capabilities = config.createCapabilities(); assertThat(capabilities.getCapability(CapabilityType.PROXY), is(notNullValue())); }