Beispiel #1
0
        private static WinStatusBar GetWinStatusBar(string uiTitle, string uiType)
        {
            var htmlcontrolWin = new WinStatusBar(Window.Locate(uiTitle, uiType));
            var htmlControlWin = htmlcontrolWin;

            htmlControlWin.TechnologyName = TechnologyNameWin;
            return(htmlControlWin);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="status"></param>
        /// <param name="optionName"></param>
        /// <returns></returns>
        public static WinCustom GetStatusOption(this WinStatusBar status, string optionName)
        {
            Console.WriteLine("Get status bar option: " + optionName);
            //Test Case PremCore-3312: 50: Cursor Position Option
            string searchText = "";

            switch (optionName.ToLower())
            {
            case "cursor position":
                searchText = "X,Y: ";
                break;

            case "pixel value":
                searchText = "RGB: ";
                break;
            }
            var tesst = new WinCustom(status);

            tesst.SearchProperties.Add(new PropertyExpression(WinCustom.PropertyNames.ControlName, "McStatusBar", PropertyExpressionOperator.Contains));
            tesst.SearchProperties.Add(new PropertyExpression(WinCustom.PropertyNames.Name, searchText, PropertyExpressionOperator.Contains));
            return(tesst);
        }