diff --git a/Robot/GUI.py b/Robot/GUI.py index 719f6152..ce80b95d 100644 --- a/Robot/GUI.py +++ b/Robot/GUI.py @@ -721,9 +721,9 @@ def UIOEI_Convert_UIOInfo(inElementInfo): ################################################################################################### #Get list of top level #old name - GetRootElementList -def BackendStr_GetTopLevelList_UIOInfo(inBackend): +def BackendStr_GetTopLevelList_UIOInfo(inBackend=mDefaultPywinautoBackend): #Получить список объектов - lResultList=pywinauto.findwindows.find_elements(top_level_only=True,backend=mDefaultPywinautoBackend) + lResultList=pywinauto.findwindows.find_elements(top_level_only=True,backend=inBackend) lResultList2=[] for lI in lResultList: lTempObjectInfo=lI @@ -809,7 +809,7 @@ def UIO_FocusHighlight(lWrapperObject,colour='green',thickness=2,fill=win32defin ############################ #Старая версия ############################ -mFlagIsDebug=False +mFlagIsDebug=True #run() lText = "Bitness:" + str(struct.calcsize("P") * 8) @@ -842,6 +842,7 @@ if not mFlagIsDebug: lProcessResponse["ErrorTraceback"]=traceback.format_exc() #Зафиксировать Error message lProcessResponse["ErrorMessage"]=str(e) + #lProcessResponse["ErrorArgs"]=str(e.args) #Отправить ответ в родительский процесс ProcessCommunicator.ProcessParentWriteObject(lProcessResponse) diff --git a/Studio/Studio.py b/Studio/Studio.py index 00ae7cac..567517a6 100644 --- a/Studio/Studio.py +++ b/Studio/Studio.py @@ -69,6 +69,10 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler): self.wfile.write(bytes(message, "utf8")) # POST def do_POST(self): + #Restart studio + if self.path == '/RestartStudio': + os.execl(sys.executable,os.path.abspath(__file__),*sys.argv) + sys.exit(0) #Action ObjectInspector GetObjectList if self.path == '/ObjectDetector/JSONGetWindowListArgs': #ReadRequest diff --git a/Studio/Web/Index.xhtml b/Studio/Web/Index.xhtml index 5e980453..23dc35aa 100644 --- a/Studio/Web/Index.xhtml +++ b/Studio/Web/Index.xhtml @@ -331,8 +331,8 @@ console.log('Success handle:'+inHandleId) var lResponseJSON = JSON.parse(lData) ///Ошибка - if (lResponseJSON.hasOwnProperty("Error")) { - mGlobal.ShowModal("GUI Error",lResponseJSON.Error); + if (lResponseJSON["ErrorFlag"]==true) { + mGlobal.ShowModal("GUI Error",lResponseJSON.ErrorMessage); } }, dataType: "text" @@ -345,14 +345,14 @@ $.ajax({ type: "POST", url: 'GUIAction', - data: '{"functionName":"ElementDrawOutlineNew","argsArray":['+JSON.stringify(lSpecificationArray)+']}', + data: '{"ModuleName":"GUI","ActivityName":"UIOSelector_Highlight","ArgumentList":['+JSON.stringify(lSpecificationArray)+']}', success: function(lData,l2,l3) { lDataJSON=JSON.parse(lData); ///Показать ошибку, если таковая возникла - if (lDataJSON.hasOwnProperty("Error")) { - mGlobal.ShowModal("GUI Error",lDataJSON.Error); + if (lDataJSON["ErrorFlag"]==true) { + mGlobal.ShowModal("GUI Error",lDataJSON.ErrorMessage); } }, dataType: "text" @@ -690,6 +690,10 @@
+

OpenRPA