public static ArrayList FindElements(BaseConstraint constraint, ElementTag elementTag, ElementAttributeBag attributeBag, bool returnAfterFirstMatch, IElementCollection elementCollection)
        {
            IHTMLElementCollection elements = elementTag.GetElementCollection(elementCollection.Elements);
            ArrayList children = new ArrayList();

            if (elements != null)
            {
                // Loop through each element and evaluate
                int length = elements.length;
                for (int index = 0; index < length; index++)
                {
                    IHTMLElement element = (IHTMLElement)elements.item(index, null);
                    if (FinishedAddingChildrenThatMetTheConstraints(constraint, elementTag, attributeBag, returnAfterFirstMatch, element, ref children))
                    {
                        return(children);
                    }
                }
            }

            return(children);
        }
Пример #2
0
	    public static ArrayList FindElements(BaseConstraint constraint, ElementTag elementTag, ElementAttributeBag attributeBag, bool returnAfterFirstMatch, IElementCollection elementCollection)
	    {
	        IHTMLElementCollection elements = elementTag.GetElementCollection(elementCollection.Elements);
            ArrayList children = new ArrayList();

	        if (elements != null)
	        {
	            // Loop through each element and evaluate
	            int length = elements.length;
	            for (int index = 0; index < length; index++ )
                {
                    IHTMLElement element = (IHTMLElement)elements.item(index, null);
                    if (FinishedAddingChildrenThatMetTheConstraints(constraint, elementTag, attributeBag, returnAfterFirstMatch, element, ref children))
                    {
                        return children;
                    }
                }
	        }

	        return children;
	    }