/// <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(); }
/// <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(); }
/// <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(); } }
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); }
public bool IsNodeDisplayed(string nodeText) { Locator nodeLocator = GetTreeNodeLocator(nodeText); return(ElementHandler.Displayed(nodeLocator, container: RootElement)); }
/// <summary> /// If combobox displayed /// </summary> /// <returns></returns> public bool IsDisplayed() { return(ElementHandler.Displayed(this._RootLocator)); }