@Test public void testExistingProxyIsNotOverridden() throws Exception { DesiredCapabilities caps = internetExplorer(); org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy(); proxy.setHttpProxy(PROXY); caps.setCapability(PROXY, proxy); JsonCapabilities capabilities = buildJsonCapabilities(caps); processor.process(capabilities); assertThat(capabilities.any().get(PROXY), not(instanceOf(Proxy.class))); }
@Override public void process(JsonCapabilities caps) { caps.any().put("ie.ensureCleanSession", true); caps.any().put("ie.usePerProcessProxy", true); if (!caps.any().containsKey("proxy")) { Proxy proxy = new Proxy(); proxy.setProxyType("DIRECT"); caps.any().put("proxy", proxy); } }
IECapabilityProcessor implements CapabilityProcessor { @Override public void process(JsonCapabilities caps) { caps.any().put("ie.ensureCleanSession", true); caps.any().put("ie.usePerProcessProxy", true); if (!caps.any().containsKey("proxy")) { Proxy proxy = new Proxy(); proxy.setProxyType("DIRECT"); caps.any().put("proxy", proxy); } } }
IECapabilityProcessor implements CapabilityProcessor { @Override public void process(JsonCapabilities caps) { caps.any().put("ie.ensureCleanSession", true); caps.any().put("ie.usePerProcessProxy", true); if (!caps.any().containsKey("proxy")) { Proxy proxy = new Proxy(); proxy.setProxyType("DIRECT"); caps.any().put("proxy", proxy); } }  }
IECapabilityProcessor implements CapabilityProcessor { @Override public void process(JsonCapabilities caps) { caps.any().put("ie.ensureCleanSession", true); caps.any().put("ie.usePerProcessProxy", true); if (!caps.any().containsKey("proxy")) { Proxy proxy = new Proxy(); proxy.setProxyType("DIRECT"); caps.any().put("proxy", proxy); } }  @Override boolean accept(JsonCapabilities caps); @Override void process(JsonCapabilities caps); }
IECapabilityProcessor implements CapabilityProcessor { @Override public void process(JsonCapabilities caps) { caps.any().put("ie.ensureCleanSession", true); caps.any().put("ie.usePerProcessProxy", true); if (!caps.any().containsKey("proxy")) { Proxy proxy = new Proxy(); proxy.setProxyType("DIRECT"); caps.any().put("proxy", proxy); } }  @Override boolean accept(JsonCapabilities caps); @Override void process(JsonCapabilities caps);  }