コード例 #1
0
 public void AddRange(UITestControlCollection collectionToAdd)
 {
     foreach (UITestControl testControl in collectionToAdd)
     {
         Add(testControl);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }