https sites for returning the full set of requested urls

47 views
Skip to first unread message

Mattayi

unread,
Jan 20, 2012, 7:25:08 AM1/20/12
to BrowserMob Proxy
Hi,

Is is possible to get the set of https requests made from browser
using FirefoxDriver?

Below is the code i am using.

ProxyServer server = new ProxyServer();
server.setPort(9640);
server.start();

server.newHar("google");
driver.get("https://www.google.com");

Thread.sleep(3000);

Har har = server.getHar();
List<HarEntry> entries = har.getLog().getEntries();
for (HarEntry entry : entries) {
System.out.println(entry.getRequest().getUrl());
}

For http sites it is returning the full set of requests made. But for
https sites it is returning nothing. Note : My browser is properly
loading the provided url.


Thanks
Mathew

Patrick Lightbody

unread,
Jan 20, 2012, 11:36:23 PM1/20/12
to browserm...@googlegroups.com
Matthew,
It is definitely possible, but you have to make sure that the browser has the CyberVillians certificate authority pre-installed. Have you done that?

Patrick

Mattayi

unread,
Jan 21, 2012, 2:18:18 AM1/21/12
to BrowserMob Proxy
No, i haven't. Will install it and let you know if i have any issues

Thanks
Mathew

Mattayi

unread,
Jan 23, 2012, 5:34:10 AM1/23/12
to BrowserMob Proxy
I extracted the contents of selenium-server-standalone-2.17.0.jar and
added CyberVillians certificate to custom firefox profile.(I hope this
is the process for adding the certificate). Then used the custom
firefox profile to run the tests.
After running the scripts i got the following exception

java.lang.StringIndexOutOfBoundsException: String index out of range:
-1
at java.lang.String.substring(String.java:1938)
at
cz.mallat.uasparser.fileparser.PHPFileParser.loadFile(PHPFileParser.java:
65)
at
cz.mallat.uasparser.fileparser.PHPFileParser.<init>(PHPFileParser.java:
29)
at cz.mallat.uasparser.UASparser.loadDataFromFile(UASparser.java:212)
at
cz.mallat.uasparser.CachingOnlineUpdateUASparser.<init>(CachingOnlineUpdateUASparser.java:
55)
at
cz.mallat.uasparser.CachingOnlineUpdateUASparser.<init>(CachingOnlineUpdateUASparser.java:
26)
at
org.browsermob.proxy.http.BrowserMobHttpClient.execute(BrowserMobHttpClient.java:
381)
at
org.browsermob.proxy.http.BrowserMobHttpClient.execute(BrowserMobHttpClient.java:
356)
at
org.browsermob.proxy.http.BrowserMobHttpRequest.execute(BrowserMobHttpRequest.java:
149)
at
org.browsermob.proxy.BrowserMobProxyHandler.proxyPlainTextRequest(BrowserMobProxyHandler.java:
270)
at
org.browsermob.proxy.selenium.SeleniumProxyHandler.handle(SeleniumProxyHandler.java:
185)
at
org.browsermob.proxy.jetty.http.HttpContext.handle(HttpContext.java:
1509)
at
org.browsermob.proxy.jetty.http.HttpContext.handle(HttpContext.java:
1461)
at org.browsermob.proxy.jetty.http.HttpServer.service(HttpServer.java:
892)
at
org.browsermob.proxy.jetty.http.HttpConnection.service(HttpConnection.java:
815)
at
org.browsermob.proxy.jetty.http.HttpConnection.handleNext(HttpConnection.java:
981)
at
org.browsermob.proxy.jetty.http.HttpConnection.handle(HttpConnection.java:
832)
at
org.browsermob.proxy.jetty.http.SocketListener.handleConnection(SocketListener.java:
245)
at
org.browsermob.proxy.jetty.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.browsermob.proxy.jetty.util.ThreadPool
$PoolThread.run(ThreadPool.java:534)


Thanks
Mathew

Mattayi

unread,
Jan 30, 2012, 11:20:48 AM1/30/12
to BrowserMob Proxy
any update on this.
Reply all
Reply to author
Forward
0 new messages