Sunday, March 6, 2011

Watin HELP: how do i get the list of button using watin?

Hi,

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

thanks

From stackoverflow
  • 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

0 comments:

Post a Comment