How to find a specific item or list of items using their TagName using Watin?
As of WatiN 2.0 beta 1, this has changed to:
ie.ElementWithTag("h1", constraint);
Using Find.XXX methods creates restrictions.
Here is an example:
ie.ElementWithTag("h1", Find.ByClass("blue");
For example, to find the first <h1> on the page, use:
ie.Element("h1", Find.ByIndex(0))
this is what worked for me:
var element = ie.Element (x => x.Text == "[innerText]" && x.TagName == "[tagname]");