Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a list of elements with Watin?

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.

like image 752
Hun1Ahpu Avatar asked Oct 20 '10 09:10

Hun1Ahpu


1 Answers

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

like image 153
Bolu Avatar answered Oct 18 '22 04:10

Bolu