Ejemplo n.º 1
0
        public void BasicCheck_FindMatchingControls()
        {
            HtmlButton button = new HtmlButton(BasicTestPage);

            Mouse.Click(button.FindMatchingControls()[2]);

            AssertResult("thirdButton", "click");
        }
Ejemplo n.º 2
0
        // To click HTML button accepting two property [Using TryGetClickablePoint Method]
        public void clickHTMLButtonCollectionTwoProp(string strControl)
        {
            Keywords      KeyFound    = reader.FindControlinList(strControl);
            BrowserWindow _browser    = new BrowserWindow();
            HtmlButton    _htmlButton = new HtmlButton(_browser);

            _htmlButton.SearchProperties[KeyFound.PropertyName1] = KeyFound.PropertyValue1;
            _htmlButton.SearchProperties[KeyFound.PropertyName2] = KeyFound.PropertyValue2;
            _htmlButton.WaitForControlExist();
            int c = _htmlButton.FindMatchingControls().Count;
            var matchingControls = _htmlButton.FindMatchingControls();

            for (int i = 0; i < c; i++)
            {
                if (matchingControls[i].TryGetClickablePoint(out pt))
                {
                    Mouse.Click(matchingControls[i]);
                    break;
                }
            }
        }