public void AddRange(UITestControlCollection collectionToAdd) { foreach (UITestControl testControl in collectionToAdd) { Add(testControl); } }
public virtual UITestControlCollection GetChildren() { ReadOnlyCollection <IWebElement> descendants = WebElement.FindElements(By.XPath("*")); UITestControlCollection collection = new UITestControlCollection(); foreach (IWebElement webElement in descendants) { collection.Add(new UITestControl(this, webElement)); } return(collection); }
public UITestControlCollection FindMatchingControls() { UITestControlCollection collection = new UITestControlCollection(); ReadOnlyCollection <IWebElement> matchingElements = FindMatchingWebElements(); if (matchingElements != null) { foreach (IWebElement webElement in matchingElements) { collection.Add(new UITestControl(ParentTestControl, webElement)); } } return(collection); }