tags:

views:

81

answers:

1

I'm using WatiN to write an automated bot for harvesting information. I was just wondering, is it possible to check if an element on the page exists?

A: 

I usually the use the following:

WatiN.Core.IE window = new WatiN.Core.IE();
if (window.Elements.Exists("yourElementId")) {
// do whatever
}
Marco M.