BMP Selenium WebDriver - Page loads very slowly

222 views
Skip to first unread message

bhasky

unread,
Apr 25, 2013, 3:20:32 PM4/25/13
to browserm...@googlegroups.com
Hi,
when i launch my application, the page loading is taking more time using BMP but the page loads quickly when i use external web-proxy tools like Fiddler or Charles and off course loads quickly launch by manually. What is the problem in my code. I am using selenium webdriver. Below is my code. I am using Firefox browser. please what could be the issue.

Thanks,
Bhasky

        ProxyServer server = new ProxyServer(4444);
try {
server.start();
} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
        Proxy proxy = new Proxy();
        try {
        proxy = server.seleniumProxy();
       
} catch (UnknownHostException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
FirefoxProfile profile = new FirefoxProfile();
  profile.setPreference("network.proxy.http",proxy.getHttpProxy().split(":")[0]);
               profile.setPreference("network.proxy.http_port",Integer.parseInt(proxy.getSslProxy().split(":")[1]));

              profile.setPreference("network.proxy.ssl", proxy.getHttpProxy().split(":")[0]);
              profile.setPreference("network.proxy.ssl_port",Integer.parseInt(proxy.getSslProxy().split(":")[1]));
              profile.setPreference("network.proxy.type", proxy.getProxyType().ordinal());
              profile.setAcceptUntrustedCertificates(true);
              profile.setAssumeUntrustedCertificateIssuer(true);
              driver = new FirefoxDriver(profile);
              driver.get(http://myapplication.com);


     Even i tried with below as well but same result.

    DesiredCapabilities capabilities = new DesiredCapabilities();
   capabilities.setCapability(CapabilityType.PROXY, proxy);
   driver = new FirefoxDriver(capabilities);

bhaskar

unread,
Apr 26, 2013, 2:19:38 PM4/26/13
to BrowserMob Proxy
Hi,
Any update on this issue?

Thanks,
Bhasky



--
 
---
You received this message because you are subscribed to the Google Groups "BrowserMob Proxy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to browsermob-pro...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Patrick Lightbody

unread,
May 4, 2013, 12:16:29 PM5/4/13
to browserm...@googlegroups.com
Apologies for the slow response. I really can't tell you why it would be slower without a LOT more information. Can you show me a HAR file that you got from Firebug (using NetExport) and also a HAR file that BMP reports? Maybe that will show a difference. Also, if the site uses SSL in any way, there is a one-time performance hit as the proxy generates the certificate for the site. 

Anyway, get me more info and I can try to help.
Reply all
Reply to author
Forward
0 new messages