views:

14

answers:

1

I'm trying to use Watin for testing. And I need to get a list of elements with specific properties, e.g. all links that have "Go" title.

I was trying this:

browser.Link(link => link.Text == "Go");

but it returns only one element. Also I was trying this:

var links = from link in browser.Elements
                    where link.Text == "Go"
                    select link;

but this returns nothing.

+3  A: 

You can use Filter like: browser.Links.Filter(Find.ByText("Go"));

Bolu
thanks! that works!
Hun1Ahpu