Exemple #1
0
        /// <summary>
        /// Simulate the mouse select year item from monthpicker drop down list
        /// </summary>
        /// <param name="key">month picker year element key</param>
        /// <returns></returns>
        private void SelectYearItem(string itemKey)
        {
            var locator = GetMonthPickerYearLocator(itemKey);

            if (!ElementHandler.Displayed(locator))
            {
                DisplayItems();
            }

            ImplementNavigatorNumber(itemKey);
            FindChild(locator).Click();
        }
Exemple #2
0
        /// <summary>
        /// Simulate the mouse select month item from monthpicker drop down list
        /// </summary>
        /// <param name="key">month picker month element key</param>
        /// <returns></returns>
        private void SelectMonthItem(string itemKey)
        {
            string newItemKey = Project.LanguagePrefix + itemKey;

            var locator = GetMonthPickerMonthLocator(newItemKey);

            if (!ElementHandler.Displayed(locator))
            {
                DisplayItems();
            }

            FindChild(locator).Click();
        }
Exemple #3
0
        /// <summary>
        /// Simulate the mouse select one item from drop down list
        /// </summary>
        /// <param name="key">combo box element key</param>
        /// <returns></returns>
        public void SelectItem(string itemKey)
        {
            TimeManager.MediumPause();
            if (!String.IsNullOrEmpty(itemKey))
            {
                var locator = GetComboBoxItemLocator(itemKey);

                if (!ElementHandler.Displayed(locator))
                {
                    DisplayItems();
                }

                FindChild(locator).Click();
            }
        }
Exemple #4
0
        public bool IsChildNodeOfParent(string parentNodeText, string childNodeText)
        {
            var parentElement = GetTreeNodeElement(parentNodeText);
            var childLocator  = GetTreeNodeLocator(childNodeText);

            CollapseNode(parentNodeText);

            //when parent node is collapsed, child node does not display
            if (!ElementHandler.Displayed(childLocator, container: this.RootElement))
            {
                ExpandNode(parentNodeText);

                //when parent node is expanded, child node displays
                if (ElementHandler.Displayed(childLocator, container: this.RootElement))
                {
                    //and child identation is one level less than parent node
                    return(GetNodeIndentation(parentNodeText) + 1 == GetNodeIndentation(childNodeText));
                }
            }

            return(false);
        }
Exemple #5
0
        public bool IsNodeDisplayed(string nodeText)
        {
            Locator nodeLocator = GetTreeNodeLocator(nodeText);

            return(ElementHandler.Displayed(nodeLocator, container: RootElement));
        }
Exemple #6
0
 /// <summary>
 /// If combobox displayed
 /// </summary>
 /// <returns></returns>
 public bool IsDisplayed()
 {
     return(ElementHandler.Displayed(this._RootLocator));
 }