XPath, htmlAgilityPack and the WebBrowser control
<p>I can load a url into a WebBrowser control and perform a login (forms based), I see what I need to see. Great, now I want to use XPath to get the data I need. </p>

<p>Can't do that with a WebBrowser (unless you disagree?) so I use The Agility Pack to kick of a new session as per below:</p>

<pre><code>var wc = new WebClient();
wc.Headers[HttpRequestHeader.UserAgent] = "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0";
var doc = new HtmlAgilityPack.HtmlDocument();
doc.Load(wc.OpenRead(url), Encoding.UTF8);

var value = doc.DocumentNode.SelectSingleNode("|//li[@data-section='currentPositionsDetails']//*[@class='description']");
</code></pre>

<p>My value is not retrievable because the website doesn't expose it to the public (it wants a logged in session). How can I "pass on" my WebBrowser control session to my WebClient()? Looking into some of the methods of how to POST my login information, it all seems awfully complicated.</p>

<p>Any ideas? - Thanks</p>