开发者

Watin:Refering to href attribute of anchor tag under List item Tag

开发者 https://www.devze.com 2023-02-10 15:18 出处:网络
I am new to Watin Testing Tool. I am trying to automate my application. But i am not able to find the Input Element ie anchor tag having href attribute

I am new to Watin Testing Tool. I am trying to automate my application.

But i am not able to find the Input Element ie anchor tag having href attribute .Anchor tag is开发者_开发技巧 under List item which is under div tag.

Please help


You have severall options:

var link = browser.Link(Find.ByUrl("http://needs.to.be/exact/match.url"));

or

var link = browser.Link(Find.ByUrl(url => url != null && url.Contains("partial/match.url"));

or I you want to find a url specifically inside a list item (as of WatiN 2.0.50):

var link = browser.ListItem("listItemIdHere").Link(Find.ByUrl(url => url != null && url.Contains("partial/match.url"));
0

精彩评论

暂无评论...
验证码 换一张
取 消