Afnan Bashir
Afnan Bashir

Reputation: 7419

Can we get all the links on the page Using Watin

Is is possible to get all the Links on the page using WatiN. I found it pretty easy in html agility pack but i have to use WatiN.

Upvotes: 1

Views: 1020

Answers (1)

Baptiste Pernet
Baptiste Pernet

Reputation: 3384

you can use Browser.Links methods

using(Browser browser = new IE("http://www.sp4ce.net"))
{
    foreach(Link link in browser.Links)
    {
        Console.WriteLine(link);
    }
}

Upvotes: 2

Related Questions