I am trying to skip the BrowserMob proxy in Sauce Labs with no luck.
Here is what I tried:
Start proxy server
sh browsermob-proxy -port 9090
Run proxy
curl -X POST http://localhost:9090/proxy {"port":9091}
Launch the sauce connection and pass the proxy information
java -jar Sauce-Connect.jar myname xxxxxx -p localhost:9091
Launch Java Client
ProxyServer proxyServer = new ProxyServer(9091); proxyServer.start(); Proxy proxy = proxyServer.seleniumProxy(); DesiredCapabilities capabillities = DesiredCapabilities.firefox(); capabillities.setCapability(CapabilityType.PROXY, proxy); capabillities.setCapability("version", "5"); capabillities.setCapability("platform", Platform.XP); this.driver = new RemoteWebDriver( new URL("http://myname: xxxxxx@ondemand.saucelabs.com :80/wd/hub"), capabillities);
The following post contains a general reference article on how to make it work, but I keep getting a โProxy refused connectionโ error.
source share