I'm not sure what you mean by cascading. Are you looking for the <a/> element contained in an element with class="lineItem" that is contained in an element with class="title" ? If so, at least two things you could do to find this element:
Use Find.ByExistenceOfRelatedElement<T>(ElementSelector<T> selector)
ie.Link( Find.ByExistenceOfRelatedElement<Element>(link => link.Ancestor( Find.ByClass("title") && Find.ByExistenceOfRelatedElement<Element>(linksAncestor => linksAncestor.Ancestor( Find.ByClass("lineItem"))))));
Use Predicate<Link>
ie.Link(link => { var ancestor = link.Ancestor(Find.ByClass("title")); return ancestor != null && ancestor.Ancestor(Find.ByClass("lineItem")) != null; });
I bet there is another way.
source share