I'm following this blogpost to try and see what Fiddlercore does. The resulting console output, as per the blog, should be something like:
Requested resource from URL http://www.mozilla.org/
Requested resource from URL http://mozorg.cdn.mozilla.net/media/css/tabzilla-min.css?build=c2a3f7a
Requested resource from URL http://mozorg.cdn.mozilla.net/media/js/site-min.js?build=c2a3f7a
Requested resource from URL http://mozorg.cdn.mozilla.net/media/css/responsive-min.css?build=c2a3f7a
Requested resource from URL http://mozorg.cdn.mozilla.net/media/img/favicon.ico
Requested resource from URL http://www.mozilla.org/en-US/
However, in my case, the output has some rather generic URLs. I suppose there's something awry with my proxy, browser, ... settings somewhere? But I have no idea what. I'm trying to write code that waits for a specific resource to load, so the output below is not really useful.
Starting Fiddler proxy
Fiddler proxy listening on port 6143
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://www.mozilla.org/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://vassg142.ocsp.omniroot.com/
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://clients1.google.com/ocsp
Requested resource from URL http://ocsp.digicert.com/
Requested resource from URL http://clients1.google.com/ocsp
Requested resource from URL http://clients1.google.com/ocsp
Requested resource from URL http://clients1.google.com/ocsp
Problem fixed. First of all, I didn't have the certificate installed but was fixed with this code:
if (!Fiddler.CertMaker.rootCertExists())
{
if (!Fiddler.CertMaker.createRootCert())
{
throw new Exception("Unable to create cert for FiddlerCore.");
}
}
if (!Fiddler.CertMaker.rootCertIsTrusted())
{
if (!Fiddler.CertMaker.trustRootCert())
{
throw new Exception("Unable to install FiddlerCore's cert.");
}
}
Secondly, I had to define the SslProxy for Selenium to capture HTTPS:
OpenQA.Selenium.Proxy proxy = new OpenQA.Selenium.Proxy();
proxy.HttpProxy = string.Format("127.0.0.1:{0}", proxyPort);
proxy.SslProxy = string.Format("127.0.0.1:{0}", proxyPort);