c# - How to get data from iframes -
<td> <iframe> #document <html> <body> <table> <tbody> <tr>..<tr> <tr> <td> <select id="selyear" onchange="document.getelementbyid('selcat').selectedindex=0; document.g…tedindex=0;document.getelementbyid('frmfindparts').submit();" name="year"> <option value=""></option> <option value="2014"></option> </td> </tr> </tbody> </table><body></html></iframe></tr>
i need data inside option value , output 2014.i using c#. need xpath exactly. here code
var html = pageretriever.readfromserver(pqi.url, false); var htmldoc = new htmldocument(); htmldoc.loadhtml(html); var tags = htmldoc.documentnode.selectnodes("xpath please");
var options = htmldoc.documentnode.selectnodes("//option") .select(o => o.attributes["value"].value) .tolist();
Comments
Post a Comment