コード例 #1
0
        public void CloseMasterPlus(int timeout = 10)
        {
            var buttonClose = GetMasterPlusMainWindow().GetElementFromChild(MPObj.CloseMasterPlusButton);

            buttonClose.DoClickPoint(1);
            UtilWait.ForTrue(() => !UtilProcess.IsProcessExistedByName(this.SwProcessName), timeout);
        }
コード例 #2
0
ファイル: MonitorAction.cs プロジェクト: HuangLuffy/ezTesting
 public HttpStatusCode StartMonitorCrash()
 {
     UtilCmd.Clear();
     UtilCmd.WriteLine("Crash Monitor is running!");
     //UtilCmd.WriteLine("*********************************************");
     UtilProcess.StartProcess(_portal.SwLnkPath);
     UtilTime.WaitTime(1);
     MonitorCrashThread = new Thread(() =>
     {
         while (true)
         {
             if (UtilProcess.IsProcessExistedByName(_portal.SwProcessName))
             {
                 UtilTime.WaitTime(0.5);
             }
             else
             {
                 UtilCmd.WriteLine("Crash occurred!");
                 var t = RequestApi.Get("http://10.10.51.59:9100/Crashed");
                 AbortMonitorCrash();
                 return;
             }
         }
     });
     MonitorCrashThread.Start();
     return(HttpStatusCode.OK);
 }
コード例 #3
0
 public AT GetMasterPlusMainWindowForLaunching(int timeout = 0)
 {
     return(UtilWait.ForNonNull(() =>
     {
         if (UtilProcess.IsProcessExistedByName("RENEW"))
         {
             UtilProcess.KillProcessByName("RENEW");
         }
         var mainWindow = GetMasterPlusMainWindow();
         mainWindow.GetElement(MPObj.DeviceList);
         return mainWindow;
     }, timeout, 2));
 }