'C# Running code on open webbrowser, downloading specific files

So this is a bit of a tricky problem I'm having and I'm starting to think that it's not easily possible.

There's a website that has a level of security that I am trying to automatically download files from(it's a banking site). The website will not save user info when you log in, and after logging in you have to verify a certificate in your browser to receive your reports. Once you've verified the browser with the certificate and are logged in, however, you are free to open up the reports(pdf files) by directly typing in the link to them.

For other sites, I would do something like:

using (WebClient client = new WebClient())
{
  client.DownloadFile(PDFFileReportWebsite,@LocalLocationToStoreFile);
}

But for this site, I have no idea what to do(the above doesn't work). Is there a way to have code like above run from within the browser itself after I've logged in and verified my certificate?

One solution I thought of that would be overkill(nevermind just gross/hacky), and I can't imagine the best option, would be to make a webbrowser app in C# and run the code on that browser after logging in.

EDIT:

ProcessStartInfo pi = new ProcessStartInfo(WebAddressOfPdfFileINeed);
Process.Start(pi);

correctly opens up the webbrowser(chrome since its my default) to the file I need(If I'm already logged in and verified my cert). Is there a way to force chrome to save this file or print it as text or a pdf?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source