c# - How can I click a link using HtmlAgilityPack? -
htmlweb web = new htmlweb(); htmlagilitypack.htmldocument doc = web.load(url); var inputforms = doc.documentnode.descendants("input"); var hreflinks = doc.documentnode.descendants("a"); foreach(htmlnode input in inputforms) { if(input.outerhtml.contains("submit-chn:$internal_password.pss")) { messagebox.show("found it"); // // input.click(); // newly navigatedpage reprocessed } }
instead of messagebox, want click input , navigate new page.
i stuck here appreciated. avoiding use of webbrowser control or mshtml
Comments
Post a Comment