private List <string> GetDiscussionUrls(IE ie, string siteUrl) { List <string> discussions = new List <string>(); ie.GoTo(siteUrl); ie.WaitForComplete(); bool done = false; ie.Link(Find.ById("discussionTab")).Click(); while (!done) { ie.WaitForComplete(); foreach (var div in ie.Divs) { if (div.ClassName == "post_content") { discussions.Add(div.Link(Find.First()).Url); } } var pag = ie.List(Find.ById("discussion_pagination")); var link = pag.Link(Find.ByText("Next")); if (link.Exists) { link.Click(); } else { done = true; } } return(discussions); }
public StaticElementFinder(DomContainer domcontainer, INativeElement nativeElement) : base(CreateTagList(nativeElement), Find.First()) { _domContainer = domcontainer; _nativeElement = nativeElement; }
public T First() { return((T)FindFirst(Find.First())); }
public Element First() { return(FindFirst(Find.First())); }