Page gets timeout when trying to access through Proxy

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Page gets timeout when trying to access through Proxy

kkarthiksw
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]

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cf4f4ed7-d321-47c3-8f02-c0e070fa611c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.