private void getAndConditions(string name, string automationId, string className, string controlType)
        {
            ResultAndCondition = null;

            var cmdlet =
                new GetControlCmdletBase {
                Name = name, AutomationId = automationId, Class = className, CaseSensitive = false
            };

            var common =
                new CommonCmdletBase();

            // 20131128
            //ResultAndCondition =
            //    (common.GetControlConditionsForWildcardSearch(cmdlet, controlType, cmdlet.CaseSensitive, true) as AndCondition);
            // 20131129
            // ResultAndCondition =
            //     (common.GetControlConditionsForWildcardSearch(cmdlet, controlType, cmdlet.CaseSensitive));
            ResultAndCondition =
                // common.GetWildcardSearchCondition(cmdlet) as AndCondition;
                ControlSearcher.GetWildcardSearchCondition(
                    new ControlSearcherData {
                Name          = name,
                AutomationId  = automationId,
                Class         = className,
                CaseSensitive = false
            }) as AndCondition;
        }
        private void checkConditionsArray(
            string controlType,
            string controlTypeProperty,
            string controlTypeValue)
        {
            Condition[] conditions = null;
            cmdlet =
                new UIAutomation.Commands.GetUiaControlCommand();
            cmdletBase =
                new GetControlCmdletBase();

            Condition condition =
                // cmdlet.GetWildcardSearchCondition(cmdlet);
                ControlSearcher.GetWildcardSearchCondition(
                    new ControlSearcherData {
                // completely new
                Name         = cmdlet.Name,
                AutomationId = cmdlet.AutomationId,
                Class        = cmdlet.Class,
                Value        = cmdlet.Value,
                ControlType  = cmdlet.ControlType
            });

            // 20140630
            // conditions = ((AndCondition)condition).GetConditions();
            if (null != condition as AndCondition)
            {
                conditions = ((AndCondition)condition).GetConditions();
            }
            else if (null != condition as OrCondition)
            {
                conditions = ((OrCondition)condition).GetConditions();
            }
            else
            {
                conditions = new[] { condition };
            }

            foreach (Condition cond in conditions)
            {
                if ((cond as PropertyCondition) != null)
                {
                    MbUnit.Framework.Assert.AreEqual(
                        controlTypeProperty,
                        (cond as PropertyCondition).Property.ProgrammaticName);
                    MbUnit.Framework.Assert.AreEqual(
                        controlTypeValue,
                        (cond as PropertyCondition).Value.ToString());
                }
                else
                {
                    MbUnit.Framework.Assert.AreEqual(cond, Condition.TrueCondition);
                }
            }
        }
        private void getOrConditions(string searchString, string controlType)
        {
            ResultOrCondition = null;

            GetControlCmdletBase cmdlet =
                new GetControlCmdletBase {
                ContainsText = searchString
            };

            CommonCmdletBase common =
                new CommonCmdletBase();

            // 20131129
            // ResultOrCondition =
            //     (common.GetControlConditionsForExactSearch(cmdlet, controlType, cmdlet.CaseSensitive, false) as OrCondition);
            ResultOrCondition =
                // common.GetTextSearchCondition(searchString, new string[] { controlType }, cmdlet.CaseSensitive) as OrCondition;
                ControlSearcher.GetTextSearchCondition(searchString, new string[] { controlType }, cmdlet.CaseSensitive) as OrCondition;
        }
예제 #4
0
 public InvokeScriptCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #5
0
 public InvokeControlClickCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #6
0
 public HideCurrentHighlighterCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #7
0
 internal SeReadWebDriverPageSourceCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #8
0
 protected internal void WriteWarn(CommonCmdletBase cmdlet, string text)
 {
     string reportString =
         CmdletSignature(cmdlet) +
         text;
     
     // 20140317
     // turning off the logger
     // Logger.Warn(reportString);
 }
예제 #9
0
 public SetFocusCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #10
0
 public ConvertFromTableCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #11
0
 public ShowDesktopCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
 public ConvertFromTableCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #13
0
 public EventCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 internal SeAddChromeArgumentCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #15
0
 internal GetVmCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #16
0
 internal SeReadWebElementLocationCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 internal NewHostConnectionDataCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #18
0
 public MoveCursorCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #19
0
 protected internal void WriteDebug(CommonCmdletBase cmdlet, object obj)
 {
     string reportString =
         CmdletSignature(cmdlet) +
         obj.ToString();
     
     WriteLog(LogLevels.Debug, reportString);
 }
 internal TmxOpenTestScenarioCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #21
0
 internal SeStartSafariCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #22
0
 public WaitControlStateCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
 internal SeGetWebDriverCookiesCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #24
0
 internal SeSetIeOptionCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #25
0
 internal SeNavigationCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #26
0
 internal RemoveVmCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
 internal SeSaveScreenshotCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 NewHostConnectionDataCommand GIVEN_command(CommonCmdletBase cmdlet)
 {
     return new NewHostConnectionDataCommand(cmdlet);
 }
예제 #29
0
 internal SeSetWebDriverTimeoutCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 internal SeAddFirefoxExtensionCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #31
0
 internal SeWebDriverCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #32
0
 internal SeSetWebElementKeysCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 internal SeReadWebElementDisplayedCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #34
0
 internal MoqCommand(CommonCmdletBase cmdlet)
 {
 }
예제 #35
0
 public InvokeWizardCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #36
0
 internal SeAddChromeArgumentCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #37
0
 protected internal void WriteDebug(CommonCmdletBase cmdlet, string text)
 {
     string reportString =
         CmdletSignature(cmdlet) +
         text;
     
     WriteLog(LogLevels.Debug, reportString);
 }
예제 #38
0
 internal SeReadWebElementAttributeCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #39
0
 protected internal void WriteInfo(CommonCmdletBase cmdlet, string text)
 {
     if (!string.IsNullOrEmpty(text) && !string.IsNullOrEmpty(text.Trim())) {
         string reportString =
             CmdletSignature(cmdlet) +
             text;
         
         // 20140317
         // turning off the logger
         // Logger.Info(reportString);
     } else {
         // 20140317
         // turning off the logger
         // Logger.Info(text);
     }
 }
 internal SeGetWebDriverCookiesCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #41
0
 public SetControlKeysCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 internal SeGetElementByTypeCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #43
0
 public GetControlCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #44
0
 internal TamsCommand(CommonCmdletBase cmdlet)
 {
     Cmdlet = cmdlet;
 }
 internal SeReadWebElementTagNameCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #46
0
 internal SeSubmitWebElementCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #47
0
 internal NewVmCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 public ConvertToSearchCriteriaCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #49
0
 public WaitControlIsEnabledCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
 public HideCurrentHighlighterCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #51
0
 internal DataCommand(CommonCmdletBase cmdlet)
 {
     Cmdlet = cmdlet;
 }
예제 #52
0
 public GetWindowCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #53
0
 internal Win32Command(CommonCmdletBase cmdlet)
 {
     Cmdlet = cmdlet;
 }
예제 #54
0
 internal SeWebElementCommand(CommonCmdletBase cmdlet) : base(cmdlet)
 {
 }
예제 #55
0
 public SetControlTextCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #56
0
 public GetControlCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #57
0
 internal StopServerCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
예제 #58
0
 public EventCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
     
 }
 public RegisterUnexpectedWindowCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
 }
 public WaitControlIsVisibleCommand(CommonCmdletBase cmdlet) : base (cmdlet)
 {
     
 }