views:

298

answers:

1

Hi,

How can i use Watin to get the list of available button on a website? How do the watinTestRecorder do it?

thanks

+1  A: 

Hi,

IE ie = new IE("www.example.com/pagewithbuttons.html");

ButtonCollection buttons = ie.Buttons;

If you want to filter out in visible buttons, use:

ButtonCollection buttons = ie.Buttons.Filter(!Find.ByStyle("visible", "none"));

HTH, Jeroen van Menen