/// <summary> /// Finds the first row that meets the <see cref="TableRowAttributeConstraint"/>. /// If no match is found, <c>null</c> is returned. /// </summary> /// <param name="findBy">The constraint used to identify the table cell.</param> /// <returns>The searched for <see cref="TableRow"/>; otherwise <c>null</c>.</returns> public TableRow FindRowInDirectChildren(TableRowAttributeConstraint findBy) { ElementAttributeBag attributeBag = new ElementAttributeBag(DomContainer); ArrayList elements = IEElementFinder.FindElements(findBy, (ElementTag)Core.TableRow.ElementTags[0], attributeBag, true, new Rows(this)); if (elements.Count > 0) { return(new TableRow(DomContainer, (IHTMLTableRow)elements[0])); } return(null); }
public bool Exists(BaseConstraint findBy) { ElementAttributeBag attributeBag = new ElementAttributeBag(domContainer); foreach (IHTMLElement element in Elements) { attributeBag.IHTMLElement = element; if (findBy.Compare(attributeBag)) { return(true); } } return(false); }
private ArrayList FilterElements(BaseConstraint findBy) { ArrayList returnElements = new ArrayList(); ElementAttributeBag attributeBag = new ElementAttributeBag(domContainer); foreach (IHTMLElement element in Elements) { attributeBag.IHTMLElement = element; if (findBy.Compare(attributeBag)) { returnElements.Add(element); } } return(returnElements); }