Page gets timeout when trying to access through Proxy

25 views
Skip to first unread message

kkart...@gmail.com

unread,
May 1, 2018, 11:24:41 PM5/1/18
to Selenium Users
Hi,

When trying to access the URL through proxy few URL are not getting loaded/working but other couple of URL working fine so the proxy working fine , also I have tried manually through proxy all the URL its working fine.

Below are the details  .

geckodriver 0.18.0
Selenium version -3.7.1
Firefox version -57.0 (and tried in 52.0)
OS -CentOS Linux release 7.4.1708 (Core)

Code:
public WebDriver getDriver() throws IOException{
com.google.gson.JsonObject json = new com.google.gson.JsonObject();
json.addProperty("proxyType", "MANUAL");
json.addProperty("httpProxy", PROXY);
//json.addProperty("httpProxyPort", PORT);
json.addProperty("sslProxy", PROXY);
FirefoxOptions options = new FirefoxOptions();
//options.addPreference("--log", "INFO");
options.setLogLevel(Level.ALL);
DesiredCapabilities cap = new DesiredCapabilities();
cap=options.addTo(cap);
cap.setCapability("proxy", json);
FirefoxBinary firefoxBinary = new FirefoxBinary(exe);
    firefoxBinary.addCommandLineOptions("--headless");
GeckoDriverService service =new GeckoDriverService.Builder(firefoxBinary)
  .usingDriverExecutable(new File("/usr/local/bin/geckodriver"))
  .usingAnyFreePort()
  .usingAnyFreePort()
  .build();
service.start();
return driver = new FirefoxDriver(service, cap);

}}

Logs:
1525210628253   webdriver::server       DEBUG   -> POST /session/9776244b-51ca-442a-b82b-f34425ac8981/url {"url":"https://xxx.net/federation/UI/Login"}
1525210628255   geckodriver::marionette TRACE   -> 65:[0,2,"get",{"url":"https://xxx.net/federation/UI/Login"}]
1525210628255   Marionette      TRACE   0 -> [0,2,"get",{"url":"https://xxx.net/federation/UI/Login"}]
1525210628257   Marionette      DEBUG   Received DOM event "beforeunload" for "about:blank"
1525210628674   Marionette      DEBUG   Received DOM event "pagehide" for "about:blank"
1525210628674   Marionette      DEBUG   Received DOM event "unload" for "about:blank"
JavaScript warning: https://xxx.net/federation/js/vendor/jquery-1.10.1.min.js, line 1: Using //@ to indicate sourceMappingURL pragmas is deprecated. Use //# instead
1525210629365   Marionette      DEBUG   Received DOM event "DOMContentLoaded" for "https://xxx.net/federation/UI/Login"
1525210667511   addons.productaddons    WARN    Failed downloading XML, status: 0, reason: timeout
1525210928260   Marionette      TRACE   0 <- [1,2,{"error":"timeout","message":"Timeout loading page after 300000ms","stacktrace":"WebDriverError@chrome://marionette/content/error.js:235:5\nTimeoutError@chrome://marionette/content/error.js:505:5\nnotify@chrome://marionette/content/listener.js:381:13\n"},null]

Reply all
Reply to author
Forward
0 new messages