I have coded as below to capture https url and declared flags as above before strating fiddler proxy
CONFIG.bCaptureCONNECT = true;
CONFIG.IgnoreServerCertErrors = true;
CONFIG.bMITM_HTTPS = true;
var cert = InstallCertificate();
Console.WriteLine("Certificate installed {0}", cert);
int proxyPort = p.StartProxy(0);
FiddlerApplication.BeforeRequest += delegate(Session oSession)
{
Console.WriteLine("Request URL {0}", oSession.fullUrl);
};
OpenQA.Selenium.Proxy proxy = new OpenQA.Selenium.Proxy();
proxy.HttpProxy = string.Format("127.0.0.1:{0}", proxyPort);
FirefoxProfile profile = new FirefoxProfile();
profile.SetProxyPreferences(proxy);
IWebDriver driver = new FirefoxDriver(profile);
driver.Navigate().GoToUrl(<url>);
public static bool InstallCertificate()
{
if (!CertMaker.rootCertExists())
{
if (!CertMaker.createRootCert())
return false;
if (!CertMaker.trustRootCert())
return false;
X509Store certStore = new X509Store(StoreName.Root, StoreLocation.LocalMachine);
certStore.Open(OpenFlags.ReadWrite);
try
{
certStore.Add(CertMaker.GetRootCertificate());
}
finally
{
certStore.Close();
}
}
return true;
}