I have been trying to pass BrowserMob proxy to Sauce Labs with no luck.
Here's what I have tried:
Start proxy server
sh browsermob-proxy -port 9090
Start proxy
curl -X POST http://localhost:9090/proxy {"port":9091}
Start sauce connect, and pass proxy server information
java -jar Sauce-Connect.jar myname xxxxxx -p localhost:9091
Run 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:[email protected]:80/wd/hub"), capabillities);
The following post provides a general guide line regarding how to make it work, but I keep getting "The proxy server is refusing connections" error.