I am able to login to the webpage just fine and navigate to the page inside the website "urlCanada". However, when try to load that information into htmlCanada and debug it, it shows me the html of the login screen instead of the html of the navigated page. Am I missing something? Why would htmlCanda be back to the login page if I told it to GetStringAsync from the navigated page?
var urlCanada = webBrowserCanada.Url;
//Creates a client for you to store the webpage in
var httpClientCanada = new HttpClient();
var htmlCanada = await httpClientCanada.GetStringAsync(urlCanada);
//Allows parsing the information out
var htmlDocumentCanada = new HtmlAgilityPack.HtmlDocument();
htmlDocumentCanada.LoadHtml(htmlCanada);
//Parse the information
var ProductsHtml = htmlDocumentCanada.DocumentNode
.SelectSingleNode("//table[@id='tableid']")
.Descendants("tr")
.Skip(1)
.Where(tr => tr.Elements("td").Count() > 1)
.Select(tr => tr.Elements("td").Select(td => td.InnerText.Trim()).ToList())
.ToList();
This is the html of the table
<table class="GridViewMFG" rules="all" id="ctl00_mainContent_GridViewIssuedParts" style="width:100%;border-collapse:collapse;" cellspacing="0" cellpadding="4" border="1">
</table>
P.S. When I debug and look at webBrowserCanada.Url it shows the html of the navigated webpage.