コード例 #1
0
        public TestIt()
        {
            _MpCases         = new MasterPlusTestCases();
            KeysSpy          = new KeysSpyOp(_MpCases.MpActions.KeySpyRelativePath);
            _portalTestFlows = new PortalTestFlows();
            //AssembleTopMenu();
            GetKeyboardKeysFromKeyMapTabFile();
            GetMatrixFromFile();
            UtilKeys.SetPhysicalKeyStatus(KbKeys.SC_KEY_NUM_LOCK.KeyValue, UtilKeys.Status.On);
            UtilKeys.SetPhysicalKeyStatus(KbKeys.SC_KEY_CAP.KeyValue, UtilKeys.Status.Off);

            //UtilLoop.testA();
            //_MpCases.Case_AssignInLoop(blAssignKey: true, blVerifyKeyWork: false, blScanCodeInput: true);

            _MpCases.Case_AssignInLoop(true, false, true);
            this.Suit_KeyMappingBaseTest("SK652");
            UtilProcess.KillAllProcessesByName("wmplayer");
            UtilTime.WaitTime(1);
            var p         = UtilWmp.StartWmpWithMedias(Path.Combine(_MpCases.MpActions.MediaFolderPath, "1.mp3"), Path.Combine(_MpCases.MpActions.MediaFolderPath, "2.mp3"), Path.Combine(_MpCases.MpActions.MediaFolderPath, "3.mp3"));
            var wmpWindow = new AT().GetElementFromHwndAndWaitAppears(p);
            var sliderbar = wmpWindow.GetElementFromDescendants(new ATElementStruct()
            {
                ControlType = AT.ControlType.Slider
            });
            var barValue1 = sliderbar.DoGetValue();

            UtilTime.WaitTime(0.5);
            var barValue2 = sliderbar.DoGetValue();

            _MpCases.Case_CheckAllKeysOnRelayController();
        }
コード例 #2
0
        private AT LaunchAndGetWmplayer()
        {
            UtilProcess.KillAllProcessesByName("wmplayer");
            UtilTime.WaitTime(1);
            var p         = UtilWmp.StartWmpWithMedias(Path.Combine(this.MediaFolderPath, "1.mp3"), Path.Combine(this.MediaFolderPath, "2.mp3"), Path.Combine(this.MediaFolderPath, "3.mp3"));
            var wmpWindow = new AT().GetElementFromHwndAndWaitAppears(p);

            HWSimulator.HWSend.MoveMouseTo((int)(wmpWindow.GetElementInfo().RectangleRight() - wmpWindow.GetElementInfo().RectangleLeft()) / 2, (int)(wmpWindow.GetElementInfo().RectangleBottom() - wmpWindow.GetElementInfo().RectangleTop()) / 2);
            return(wmpWindow);
        }
コード例 #3
0
        private dynamic SuitCommon(Func <dynamic> Suit_Func, string deviceName)
        {
            _MpCases.Ireporter.GetResultTestInfo().AttrDeviceModel = deviceName;
            _MpCases.Ireporter.GetResultTestInfo().AttrTestName    = Suit_Func.Method.Name;
            var r = Suit_Func.Invoke();

            _MpCases.LaunchTestReport();
            UtilProcess.KillAllProcessesByName("KeysSpy");
            return(r);
        }