(I'm in geek mode at the moment because I've been setting up an automated test framework for the project I'm managing, which has seen me learn C#, which is fun. So I guess I'm not a typical PM. But I digress...)
Context: you want to parse some HTML using XPATH in C#. All roads appear to point to HtmlAgilityKit. I specifically was trying to do is make it really easy for testers to check the contents of dropdown lists so I write a Custom ValidationRule for Microsoft WebTest called 'ValidateDropdown' which could also easily be called 'ValidateSelect' but Select is such a uselessly generic term.
Problem: HTML defines select option like this:
<select ... ><option value="[value]">[InnerHtml]
This means the 'InnerHtml' is not associated with the option tag.
XHTML however defines it like this:
<select ... ><option value="[value]">[InnerHtml]</option>
HtmlAgilityToolkit was driving me nuts because it was actually doing strictly the right thing -- ignoring the InnerHTML. The fix is easy -- see link to forum
Enjoy!