How to find an Element in Watin by its tag name?

Nikola Stjelja picture Nikola Stjelja · Dec 23, 2008 · Viewed 10.3k times · Source

How to find a specific element, or a list of elements by using their TagName using Watin?

Answer

Jeroen van Menen picture Jeroen van Menen · Mar 31, 2009

As of WatiN 2.0 beta 1 this has changed to:

ie.ElementWithTag("h1", constraint);

Constraints are created when using the Find.XXX methods.

Here is an example:

ie.ElementWithTag("h1", Find.ByClass("blue"));