开发者

WatiN FindByIdStartsWith?

How to find element by start of id in WatiN?

Find.ById(x => x.StartsWith(rel)

开发者_StackOverflow中文版Didn't work somehow. :/


RegEx pwnage =>

 var regex = new Regex(rel + ".*");
 var links = Browser.ElementsOfType<Link>()
     .Filter(Find.By("rel", regex));


You probably need to check whether x has a value before calling StartsWith()

Find.ById(x => x != null && x.StartsWith(rel));
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜