public void CloseMasterPlus(int timeout = 10) { var buttonClose = GetMasterPlusMainWindow().GetElementFromChild(MPObj.CloseMasterPlusButton); buttonClose.DoClickPoint(1); UtilWait.ForTrue(() => !UtilProcess.IsProcessExistedByName(this.SwProcessName), timeout); }
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); }
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)); }