At the moment, I'm trying to run example from the htmlaglitypack official site, but this code is broken: http://html-agility-pack.net/from-browser
I want to extract content after script completing. My code:
private void button1_Click(object sender, EventArgs e)
{
string url = "http://html-agility-pack/from-browser";
var web2 = new HtmlWeb();
var doc2 = web2.LoadFromBrowser(url, html =>
{
return !html.Contains("<div id=\"uiDynamicText\"></div>");
});
var t2 = doc2.DocumentNode.SelectSingleNode(".//div[@id='uiDynamicText']");
listBox1.Items.Add("Text 2: " + t2.InnerHtml + t2.OuterHtml);
}
t2 stay as null. What is the problem?
Aucun commentaire:
Enregistrer un commentaire