Open walterjwhite opened 7 years ago
I tried:
None of the above had any impact.
Thanks,
Walter
I also have this problem. I tried everything I could think of:
DesiredCapabilities cap = new DesiredCapabilities();
Proxy proxy = new Proxy();
proxy
.setHttpProxy("127.0.0.1:8181")
.setFtpProxy("127.0.0.1:8181")
.setSslProxy("127.0.0.1:8181")
.setSocksProxy("127.0.0.1:8181")
.setProxyType(Proxy.ProxyType.MANUAL);
cap.setCapability(CapabilityType.PROXY, proxy);
return new JBrowserDriver(cap);
DesiredCapabilities cap = new DesiredCapabilities();
Proxy proxy = new Proxy();
proxy
.setSocksProxy("127.0.0.1:8181")
.setProxyType(Proxy.ProxyType.MANUAL);
cap.setCapability(CapabilityType.PROXY, proxy);
return new JBrowserDriver(cap);
Produces right away : org.openqa.selenium.WebDriverException: org.openqa.selenium.Proxy Caused by: java.io.NotSerializableException: org.openqa.selenium.Proxy
And any combination of:
Settings.Builder settings = Settings.builder();
settings.userAgent(UserAgent.CHROME);
settings.timezone(Timezone.EUROPE_LONDON);
ProxyConfig config = new ProxyConfig(ProxyConfig.Type.SOCKS, "localhost", 8181);
settings.proxy(config);
return new JBrowserDriver(settings.build());
With or without:
System.setProperty("socksProxyHost", "localhost");
System.setProperty("socksProxyPort", "8181");
System.setProperty("jbd.proxyhost", "localhost");
System.setProperty("jbd.proxyport", "8181");
System.setProperty("jbd.proxytype", ProxyConfig.Type.SOCKS.toString());
Creates timeouts because url I am trying to load is accessible only using proxy. Please fix that.
Stack trace for serialization error: https://gist.github.com/GrzegorzDrozd/ce0b8fa74de1a18bdad0e7a82d4b9f01
It fails :/
Settings.Builder settings = Settings.builder();
settings.proxy(new ProxyConfig(ProxyConfig.Type.SOCKS, "localhost", 8181));
settings.userAgent(UserAgent.CHROME);
settings.timezone(Timezone.EUROPE_LONDON);
driver = new JBrowserDriver(settings.build());
Fails with exception: https://gist.github.com/GrzegorzDrozd/4c0ea0a338e9ec25d715dad1892bc58a
I am setting the necessary proxy (for traffic to be routed) in desired capabilities, but jbrowser driver appears to ignore those settings when I run it as a remote driver.