And Selenium shows this as page source:
<html><head></head><body style="height: 100%; width: 100%; overflow: hidden; margin:0px; background-color: rgb(82, 86, 89);"><embed name="F785A17241B40FCC2739D64E4350F6F4" style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="about:blank" type="application/pdf" internalid="F785A17241B40FCC2739D64E4350F6F4"></body></html>
My code is as following
var options = new ChromeOptions();
options.AddArguments("--incognito");
options.AddArgument("--start-maximized");
ChromeDriver cd = new ChromeDriver(@"C:\Temp\chrome", options);
cd.Url = @"Somesite/login.aspx";
cd.Navigate();
...
e.Click();
IWebElement ifamepdf = divform.FindElement(By.TagName("iframe"));
string src = ifamepdf.GetAttribute("src");
WebClient wc = new WebClient();
wc.DownloadFile(new Uri(src), @"c:\temp\teste6.pdf");
wc.Dispose();
IWebElement ifameembed = cd.FindElement(By.TagName("embed"));
string source2 = cd.PageSource;
Console.WriteLine(source2);