Exemplo n.º 1
0
        /// <summary>
        ///   Retrieves the current state of the window.
        /// </summary>
        public WindowState GetWindowState()
        {
            User32.WindowPlacement placement = GetWindowPlacement();
            var state = (User32.WindowState)placement.ShowCommand;

            return(EnumHelper <User32.WindowState> .Convert(state, _windowStateMapping));
        }
        public UIAssertAction(XmlNode node, App.Common.UITest.Runner.IWebDriver webDriver)
            : base(node, UIActionType.Assert, webDriver)
        {
            string type = node.Attributes["type"] != null ? node.Attributes["type"].Value : UIActionSeertType.Exist.ToString();

            this.AssertType = EnumHelper.Convert <UIActionSeertType>(type);
            this.Value      = node.Attributes["value"] != null ? node.Attributes["value"].Value : string.Empty;
        }
        public static IUIAction Create(System.Xml.XmlNode node, App.Common.UITest.Runner.IWebDriver webDriver)
        {
            string       tagName    = node.Name;
            UIActionType actionType = EnumHelper.Convert <UIActionType>(tagName);

            switch (actionType)
            {
            case UIActionType.Assert:
                return(new UIAssertAction(node, webDriver));

            case UIActionType.Navigate:
                return(new UINavigateAction(node, webDriver));

            case UIActionType.Click:
                return(new UIClickAction(node, webDriver));

            case UIActionType.Input:
            default:
                return(new UIInputAction(node, webDriver));
            }
        }