tags:

views:

61

answers:

1

Hi ALL,

I am writing an automation for web site. I am using the HTMLelement in the MSHtml package.Using this object I can only get elemnts by tag names/id's but not by Class name.

The above tag is a button. I waould like to invoke a click method on it.

Please help......

A: 

I am assuming that you are using IHTMLElement interface, with which you can iterate over the document and check the className member, collecting those that match.

If you are using 3.5, this sounds like a good place for Linq + an extension method.

BioBuckyBall