private ArrayList findElementsByAttribute(ElementTag elementTag, BaseConstraint constraint, bool returnAfterFirstMatch) { // Get elements with the tagname from the page constraint.Reset(); ElementAttributeBag attributeBag = new ElementAttributeBag(_domContainer); if (FindByExactMatchOnIdPossible(constraint)) { return(FindElementById(constraint, elementTag, attributeBag, returnAfterFirstMatch, _elementCollection)); } return(FindElements(constraint, elementTag, attributeBag, returnAfterFirstMatch, _elementCollection)); }