From df6978a95125f917d55d2789066044747c3d871f Mon Sep 17 00:00:00 2001 From: Ivan Maslov Date: Mon, 22 Feb 2021 15:29:44 +0300 Subject: [PATCH] Update sphinx doc in Orchestrator and in UIDesktop Orchestrator autodoc 60% Robot UIDesktop 30% --- .../Orchestrator/__Orchestrator__.py | 139 +++++-- Sources/pyOpenRPA/Robot/UIDesktop.py | 145 ++++++-- Wiki/ENG_Guide/html/Orchestrator/02_Defs.html | 148 ++++++-- Wiki/ENG_Guide/html/Robot/01_Robot.html | 232 ++++++++++++ Wiki/ENG_Guide/html/Robot/02_Defs.html | 276 +++++++++++++- .../Orchestrator/__Orchestrator__.html | 139 +++++-- .../_modules/pyOpenRPA/Robot/UIDesktop.html | 199 +++++++--- Wiki/ENG_Guide/html/genindex.html | 36 +- Wiki/ENG_Guide/html/objects.inv | Bin 918 -> 1049 bytes Wiki/ENG_Guide/html/searchindex.js | 2 +- .../markdown/Orchestrator/02_Defs.md | 162 +++++++-- Wiki/ENG_Guide/markdown/Robot/01_Robot.md | 269 ++++++++++++++ Wiki/ENG_Guide/markdown/Robot/02_Defs.md | 343 +++++++++++++++++- 13 files changed, 1870 insertions(+), 220 deletions(-) diff --git a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py index 620b8576..aecf6680 100644 --- a/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py +++ b/Sources/pyOpenRPA/Orchestrator/__Orchestrator__.py @@ -51,7 +51,7 @@ def AgentActivityItemAdd(inGSettings, inHostNameStr, inUserStr, inActivityItemDi def AgentOSCMD(inGSettings, inHostNameStr, inUserStr, inCMDStr, inRunAsyncBool=True): """ - pyOpenRPA.Agent: Send CMD to OS. Result return to log + Orchestrator by the A2O connection + Send CMD to OS throught the pyOpenRPA.Agent daemon. Result return to log + Orchestrator by the A2O connection def OSCMD(inCMDStr, inRunAsyncBool=True, inGSettings=None): Send to agent activity item to OSCMD @@ -855,7 +855,7 @@ def ProcessStop(inProcessNameWOExeStr, inCloseForceBool, inUserNameStr = "%usern def ProcessListGet(inProcessNameWOExeList=None): """ - Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it. + Return process list on the orchestrator machine sorted by Memory Usage. You can determine the list of the processes you are interested - def will return the list about it. .. code-block:: python @@ -863,7 +863,8 @@ def ProcessListGet(inProcessNameWOExeList=None): from pyOpenRPA import Orchestrator lProcessList = Orchestrator.ProcessListGet() - # Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine. + # Return the list of the process on the machine. + # !ATTENTION! RUn orchestrator as administrator to get all process list on the machine. :param inProcessNameWOExeList: :return: { @@ -881,7 +882,6 @@ def ProcessListGet(inProcessNameWOExeList=None): """ if inProcessNameWOExeList is None: inProcessNameWOExeList = [] - '''Get list of running process sorted by Memory Usage and filtered by inProcessNameWOExeList''' lMapUPPERInput = {} # Mapping for processes WO exe lResult = {"ProcessWOExeList":[], "ProcessWOExeUpperList":[],"ProcessDetailList":[]} # Create updated list for quick check @@ -913,14 +913,28 @@ def ProcessListGet(inProcessNameWOExeList=None): # Python def - start module function def PythonStart(inModulePathStr, inDefNameStr, inArgList=None, inArgDict=None, inLogger = None): """ - Python import module and start def + Import module and run def in the Orchestrator process. - :param inModulePathStr: - :param inDefNameStr: - :param inArgList: - :param inArgDict: - :param inLogger: - :return: + .. note:: + + Import module will be each time when PythonStart def will be called. + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + Orchestrator.PythonStart( + inModulePathStr="ModuleToCall.py", # inModulePathStr: Working Directory\\ModuleToCall.py + inDefNameStr="TestDef") + # Import module in Orchestrator process and call def "TestDef" from module "ModuleToCall.py" + + :param inModulePathStr: Absolute or relative (working directory of the orchestrator process) path to the importing module .py + :param inDefNameStr: Def name in module + :param inArgList: List of the arguments for callable def + :param inArgDict: Dict of the named arguments for callable def + :param inLogger: Logger instance to log some information when PythonStart def is running + :return: None """ if inArgList is None: inArgList=[] if inArgDict is None: inArgDict={} @@ -931,23 +945,42 @@ def PythonStart(inModulePathStr, inDefNameStr, inArgList=None, inArgDict=None, i except Exception as e: if inLogger: inLogger.exception("Loop activity error: module/function not founded") -# # # # # # # # # # # # # # # # # # # # # # # - # # # # # # # # # # # # # # # # # # # # # # # # Scheduler # # # # # # # # # # # # # # # # # # # # # # # def SchedulerActivityTimeAddWeekly(inGSettings, inTimeHHMMStr="23:55:", inWeekdayList=None, inActivityList=None): """ - Add activity in time weekly + Add activity item list in scheduler. You can set weekday list and set time when launch. Activity list will be executed at planned time/day. + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + # EXAMPLE 1 + def TestDef(inArg1Str): + pass + lActivityItem = Orchestrator.ProcessorActivityItemCreate( + inDef = TestDef, + inArgList=[], + inArgDict={"inArg1Str": "ArgValueStr"}, + inArgGSettingsStr = None, + inArgLoggerStr = None) + Orchestrator.SchedulerActivityTimeAddWeekly( + inGSettings = gSettingsDict, + inTimeHHMMStr = "04:34", + inWeekdayList=[2,3,4], + inActivityList = [lActivityItem]) + # Activity will be executed at 04:34 Wednesday (2), thursday (3), friday (4) :param inGSettings: Global settings dict (singleton) - :param inTimeHHMMStr: - :param inWeekdayList: - :param inActivityList: - :return: + :param inTimeHHMMStr: Activation time from "00:00" to "23:59". Example: "05:29" + :param inWeekdayList: Week day list to initiate activity list. Use int from 0 (monday) to 6 (sunday) as list items. Example: [0,1,2,3,4]. Default value is everyday ([0,1,2,3,4,5,6]) + :param inActivityList: Activity list structure + :return: None """ - if inWeekdayList is None: inWeekdayList=[] + if inWeekdayList is None: inWeekdayList=[0,1,2,3,4,5,6] if inActivityList is None: inActivityList=[] Processor.__ActivityListVerify__(inActivityList=inActivityList) # DO VERIFICATION FOR THE inActivityList lActivityTimeItemDict = { @@ -965,18 +998,64 @@ def SchedulerActivityTimeAddWeekly(inGSettings, inTimeHHMMStr="23:55:", inWeekda def RDPTemplateCreate(inLoginStr, inPasswordStr, inHostStr="127.0.0.1", inPortInt = 3389, inWidthPXInt = 1680, inHeightPXInt = 1050, inUseBothMonitorBool = False, inDepthBitInt = 32, inSharedDriveList=None): """ - Create some RDP template dict to use it when connect/reconnect + Create RDP connect dict item/ Use it connect/reconnect (Orchestrator.RDPSessionConnect) - :param inLoginStr: - :param inPasswordStr: - :param inHostStr: - :param inPortInt: - :param inWidthPXInt: - :param inHeightPXInt: - :param inUseBothMonitorBool: - :param inDepthBitInt: - :param inSharedDriveList: + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + lRDPItemDict = Orchestrator.RDPTemplateCreate( + inLoginStr = "USER_99", + inPasswordStr = "USER_PASS_HERE", + inHostStr="127.0.0.1", + inPortInt = 3389, + inWidthPXInt = 1680, + inHeightPXInt = 1050, + inUseBothMonitorBool = False, + inDepthBitInt = 32, + inSharedDriveList=None) + # lRDPTemplateDict= { # Init the configuration item + # "Host": "127.0.0.1", "Port": "3389", "Login": "USER_99", "Password": "USER_PASS_HERE", + # "Screen": { "Width": 1680, "Height": 1050, "FlagUseAllMonitors": False, "DepthBit": "32" }, + # "SharedDriveList": ["c"], + # ###### Will updated in program ############ + # "SessionHex": "77777sdfsdf77777dsfdfsf77777777", # Hex is created when robot runs, example "" + # "SessionIsWindowExistBool": False, "SessionIsWindowResponsibleBool": False, "SessionIsIgnoredBool": False + # } + + :param inLoginStr: User/Robot Login, example "USER_99" + :param inPasswordStr: Password, example "USER_PASS_HERE" + :param inHostStr: Host address, example "77.77.22.22" + :param inPortInt: RDP Port, example "3389" (default) + :param inWidthPXInt: Width of the remote desktop in pixels, example 1680 + :param inHeightPXInt: Height of the remote desktop in pixels, example 1050 + :param inUseBothMonitorBool: True - connect to the RDP with both monitors. False - else case + :param inDepthBitInt: Remote desktop bitness. Available: 32 or 24 or 16 or 15, example 32 + :param inSharedDriveList: Host local disc to connect to the RDP session. Example: ["c", "d"] :return: + { + "Host": inHostStr, # Host address, example "77.77.22.22" + "Port": str(inPortInt), # RDP Port, example "3389" + "Login": inLoginStr, # Login, example "test" + "Password": inPasswordStr, # Password, example "test" + "Screen": { + "Width": inWidthPXInt, # Width of the remote desktop in pixels, example 1680 + "Height": inHeightPXInt, # Height of the remote desktop in pixels, example 1050 + # "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen, example + "FlagUseAllMonitors": inUseBothMonitorBool, # True or False, example False + "DepthBit": str(inDepthBitInt) # "32" or "24" or "16" or "15", example "32" + }, + "SharedDriveList": inSharedDriveList, # List of the Root sesion hard drives, example ["c"] + ###### Will updated in program ############ + "SessionHex": "77777sdfsdf77777dsfdfsf77777777", # Hex is created when robot runs, example "" + "SessionIsWindowExistBool": False, + # Flag if the RDP window is exist, old name "FlagSessionIsActive". Check every n seconds , example False + "SessionIsWindowResponsibleBool": False, + # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too , example False + "SessionIsIgnoredBool": False # Flag to ignore RDP window False - dont ignore, True - ignore, example False + } + """ if inSharedDriveList is None: inSharedDriveList = ["c"] lRDPTemplateDict= { # Init the configuration item @@ -1006,7 +1085,7 @@ def RDPTemplateCreate(inLoginStr, inPasswordStr, inHostStr="127.0.0.1", inPortIn # Return list if dublicates def RDPSessionDublicatesResolve(inGSettings): """ - Search dublicates in GSettings RDPlist + DEVELOPING Search dublicates in GSettings RDPlist !def is developing! :param inGSettings: Global settings dict (singleton) diff --git a/Sources/pyOpenRPA/Robot/UIDesktop.py b/Sources/pyOpenRPA/Robot/UIDesktop.py index 55c3042e..f82cc34b 100644 --- a/Sources/pyOpenRPA/Robot/UIDesktop.py +++ b/Sources/pyOpenRPA/Robot/UIDesktop.py @@ -240,6 +240,14 @@ def UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseExcep #inFlagRaiseException - Флаг True - выкинуть ошибку в случае обнаружении пустого списка #old name - PywinautoExtElementGet def UIOSelector_Get_UIO (inSpecificationList,inElement=None,inFlagRaiseException=True): + ''' + Get the pywinauto object by the UIO selector. + + :param inSpecificationList: + :param inElement: + :param inFlagRaiseException: + :return: + ''' lResult=None #Получить родительский объект если на вход ничего не поступило lResultList=UIOSelector_Get_UIOList(inSpecificationList,inElement,False) @@ -255,6 +263,12 @@ def UIOSelector_Get_UIO (inSpecificationList,inElement=None,inFlagRaiseException #UIOSelector #old name - - def UIOSelector_Exist_Bool (inUIOSelector): + ''' + Check if object is exist by the UIO selector. + + :param inUIOSelector: + :return: True - Object is exist. False - else case + ''' lResult=False #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) @@ -288,6 +302,18 @@ def UIOSelector_Exist_Bool (inUIOSelector): #####Внимание##### ##Функция ожидания появления элементов (тк элементы могут быть недоступны, неизвестно в каком фреймворке каждый из них может появиться) def UIOSelectorsSecs_WaitAppear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False): + ''' + Wait for many UI object will appear in GUI for inWaitSecs seconds. + + :param inSpecificationListList: UIOSelector list. + Example: [ + [{"title":"notepad"},{"title":"OK"}], + [{"title":"notepad"},{"title":"Cancel"}] + ] + :param inWaitSecs: Float value (seconds) for wait UI element appear in GUI + :param inFlagWaitAllInMoment: True - Wait all UI objects from the UIOSelector list to be appeared + :return: List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{"title":"notepad"},{"title":"Cancel"}] + ''' lResultFlag=False lSecsSleep = 1 #Настроечный параметр lSecsDone = 0 @@ -327,6 +353,19 @@ def UIOSelectorsSecs_WaitAppear_List (inSpecificationListList,inWaitSecs,inFlagW #####Внимание##### ##Функция ожидания пропажи элементов (тк элементы могут быть недоступны, неизвестно в каком фреймворке каждый из них может появиться) def UIOSelectorsSecs_WaitDisappear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False): + ''' + Wait for many UI object will disappear in GUI for inWaitSecs seconds. + + :param inSpecificationListList: UIOSelector list. + Example: [ + [{"title":"notepad"},{"title":"OK"}], + [{"title":"notepad"},{"title":"Cancel"}] + ] + :param inWaitSecs: Float value (seconds) for wait UI element disappear in GUI + :param inFlagWaitAllInMoment: True - Wait all UI objects from the UIOSelector list to be disappeared. + :return: List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{"title":"notepad"},{"title":"Cancel"}] + :return: + ''' lResultFlag=False lSecsSleep = 1 #Настроечный параметр lSecsDone = 0 @@ -363,6 +402,13 @@ def UIOSelectorsSecs_WaitDisappear_List (inSpecificationListList,inWaitSecs,inFl #return: Bool - True - UIO is appear #old name - - def UIOSelectorSecs_WaitAppear_Bool (inSpecificationList,inWaitSecs): + ''' + Wait for UI object will appear in GUI for inWaitSecs seconds. + + :param inSpecificationList: UIOSelector. Example: [{"title":"notepad"},{"title":"OK"}] + :param inWaitSecs: Float value (seconds) for wait UI element appear in GUI + :return: True - UI object will appear. False - else case + ''' lWaitAppearList=UIOSelectorsSecs_WaitAppear_List([inSpecificationList],inWaitSecs) lResult=False if len(lWaitAppearList)>0: @@ -375,6 +421,14 @@ def UIOSelectorSecs_WaitAppear_Bool (inSpecificationList,inWaitSecs): #return: Bool - True - UIO is Disappear #old name - - def UIOSelectorSecs_WaitDisappear_Bool (inSpecificationList,inWaitSecs): + ''' + Wait for UI object will disappear in GUI for inWaitSecs seconds. + + :param inSpecificationList: UIOSelector. + Example: [{"title":"notepad"},{"title":"OK"}] + :param inWaitSecs: Float value (seconds) for wait UI element disappear in GUI + :return: True - UI object will disappear. False - else case + ''' lWaitDisappearList=UIOSelectorsSecs_WaitDisappear_List([inSpecificationList],inWaitSecs) lResult=False if len(lWaitDisappearList)>0: @@ -386,6 +440,12 @@ def UIOSelectorSecs_WaitDisappear_Bool (inSpecificationList,inWaitSecs): #old name - None #return None (if Process not found), int 32, or int 64 def UIOSelector_Get_BitnessInt (inSpecificationList): + ''' + Detect process bitness by the UI Object UIO Selector. + + :param inSpecificationList: UIOSelector. Example: [{"title":"notepad"},{"title":"OK"}] + :return: int 32 or int 64 + ''' lResult=None #Получить объект Application (Для проверки разрядности) lRootElement=PWASpecification_Get_PWAApplication(inSpecificationList) @@ -401,6 +461,12 @@ def UIOSelector_Get_BitnessInt (inSpecificationList): #old name - None #return None (if Process not found), int 32, or int 64 def UIOSelector_Get_BitnessStr (inSpecificationList): + ''' + Detect process bitness by the UI Object UIO Selector. + + :param inSpecificationList: UIOSelector. Example: [{"title":"notepad"},{"title":"OK"}] + :return: str "32" or str "64" + ''' lResult=None #Получить объект Application (Для проверки разрядности) lRootElement=PWASpecification_Get_PWAApplication(inSpecificationList) @@ -415,15 +481,23 @@ def UIOSelector_Get_BitnessStr (inSpecificationList): #old name - None #return int 32, or int 64 def Get_OSBitnessInt (): - lResult=32; + ''' + Detect OS bitness. + + :return: int 32 or int 64 + ''' + lResult=32 if pywinauto.sysinfo.is_x64_OS(): - lResult=64; - return lResult; + lResult=64 + return lResult ################################################################################################# -#Safe get other process or None if destination app is the other/same bitness -#inUIOSelector - selector of the destination -#return None or process (of the other bitness) def UIOSelector_SafeOtherGet_Process(inUIOSelector): + ''' + Safe get other process or None if destination app is the other/same bitness + + :param inUIOSelector: UIO Selector of the UI object + :return: None or process (of the other bitness) + ''' #Default value lResult = None #Go check bitness if selector exists @@ -434,11 +508,14 @@ def UIOSelector_SafeOtherGet_Process(inUIOSelector): lResult = Utils.ProcessBitness.OtherProcessGet() return lResult ################################################################################################## -#inControlSpecificationArray - List of dict, dict in pywinauto.find_windows notation -#Backend selection - attribute "backend" ("win32" || "uia") in 1-st list element -#return list of UIO object -#old name - GetControl def PWASpecification_Get_UIO(inControlSpecificationArray): + ''' + #Backend def selection - attribute "backend" ("win32" || "uia") in 1-st list element + #old name - GetControl + + :param inControlSpecificationArray: List of dict, dict in pywinauto.find_windows notation + :return: list of UIO object + ''' #Определение backend lBackend=mDefaultPywinautoBackend if "backend" in inControlSpecificationArray[0]: @@ -448,7 +525,7 @@ def PWASpecification_Get_UIO(inControlSpecificationArray): inControlSpecificationOriginArray=copy.deepcopy(inControlSpecificationArray) inControlSpecificationArray=UIOSelector_SearchProcessNormalize_UIOSelector(inControlSpecificationArray) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] lTempObject=None if len(inControlSpecificationArray) > 0: #Сформировать выборку элементов, которые подходят под первый уровень спецификации @@ -485,11 +562,13 @@ def PWASpecification_Get_UIO(inControlSpecificationArray): lResultList.append(lTempObject) return lResultList ################################################################################################## -#inControlSpecificationArray - List of dict, dict in pywinauto.find_windows notation -#Backend selection - attribute "backend" ("win32" || "uia") in 1-st list element -#return process application object -#old name - None def PWASpecification_Get_PWAApplication(inControlSpecificationArray): + ''' + #Backend selection - attribute "backend" ("win32" || "uia") in 1-st list element + + :param inControlSpecificationArray: List of dict, dict in pywinauto.find_windows notation + :return: process application object + ''' inControlSpecificationArray=copy.deepcopy(inControlSpecificationArray) #Определение backend lBackend=mDefaultPywinautoBackend @@ -500,7 +579,7 @@ def PWASpecification_Get_PWAApplication(inControlSpecificationArray): inControlSpecificationOriginArray=inControlSpecificationArray inControlSpecificationArray=UIOSelector_SearchProcessNormalize_UIOSelector(inControlSpecificationArray) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] lTempObject=None if len(inControlSpecificationArray) > 0: #Выполнить подключение к объекту @@ -521,10 +600,14 @@ def PWASpecification_Get_PWAApplication(inControlSpecificationArray): return lTempObject ########################################################################################################### -#inElementSpecificationList = UIOSelector (see description on the top of the document) -#result = pywinauto element wrapper instance or None -#old name - AutomationSearchMouseElement def UIOSelector_SearchChildByMouse_UIO(inElementSpecification): + ''' + UIOSelector (see description on the top of the document) + #old name - AutomationSearchMouseElement + + :param inElementSpecification: UIOSelector of the UI Object + :return: pywinauto element wrapper instance or None + ''' lGUISearchElementSelected=None #Настройка - частота обновления подсвечивания lTimeSleepSeconds=0.4 @@ -556,17 +639,21 @@ def UIOSelector_SearchChildByMouse_UIO(inElementSpecification): UIO_Highlight(lElementFounded) else: #Была нажата клавиша Ctrl - выйти из цикла - lFlagLoop=False; + lFlagLoop=False #Заснуть до следующего цикла time.sleep(lTimeSleepSeconds) #Вернуть результат поиска return lElementFoundedList #################################################################################################### -#inElementSpecification - UIOSelector -#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #old name - AutomationSearchMouseElementHierarchy def UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector): + ''' + !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! + + :param inUIOSelector: UIOSelector of the UI Object + :return: ? + ''' lItemInfo = [] #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) @@ -750,7 +837,9 @@ def UIOSelector_Get_UIOActivityList (inUIOSelector): #inUIOSelector #inActionName - UIOActivity (name) from Pywinauto #old name - ElementRunAction -def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=[], inkwArgumentObject={}): +def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=None, inkwArgumentObject=None): + if inArgumentList is None: inArgumentList=[] # 2021 02 22 Minor fix by Ivan Maslov + if inkwArgumentObject is None: inkwArgumentObject={} # 2021 02 22 Minor fix by Ivan Maslov lResult={} #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) @@ -804,7 +893,7 @@ def UIOSelector_Get_UIOInfo(inUIOSelector): #Подготовка входного массива inUIOSelector=UIOSelector_SearchUIONormalize_UIOSelector(inUIOSelector) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] if len(inUIOSelector) > 0: #Получить объект lTempObject=UIOSelector_Get_UIO(inUIOSelector) @@ -832,7 +921,8 @@ def UIOSelector_Get_UIOInfo(inUIOSelector): #inHierarchyList: [{"index":<>,"element":<>}] - technical argument for internal purpose #result -List of dict [{"index":<>,"element":<>}] -- list of element hierarchy specifications #old name - GUISearchElementByRootXY -def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=[]): +def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=None): + if inHierarchyList is None: inHierarchyList = [] #Инициализация результирующего значения lResultElement = None lResultElementX1 = None @@ -921,7 +1011,8 @@ def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=[]): #!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #inControlSpecificationArray- UIOSelector #old name - ElementGetChildElementList -def UIOSelector_GetChildList_UIOList(inUIOSelector=[], inBackend=mDefaultPywinautoBackend): +def UIOSelector_GetChildList_UIOList(inUIOSelector=None, inBackend=mDefaultPywinautoBackend): + if inUIOSelector is None: inUIOSelector = [] #mRobotLogger.info(f"File!!!!") #mRobotLogger.info(f"inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}") #pdb.set_trace() @@ -1202,7 +1293,7 @@ def BackendStr_GetTopLevelList_UIOInfo(inBackend=mDefaultPywinautoBackend): lResultList2=[] for lI in lResultList: lTempObjectInfo=lI - lResultList2.append(UIOEI_Convert_UIOInfo(lI)); + lResultList2.append(UIOEI_Convert_UIOInfo(lI)) return lResultList2 ################################################################################################### diff --git a/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html b/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html index 1b270b56..c719e41a 100644 --- a/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html +++ b/Wiki/ENG_Guide/html/Orchestrator/02_Defs.html @@ -194,7 +194,7 @@

Add activity in AgentDict.

AgentOSCMD(inGSettings, inHostNameStr, …)

-

pyOpenRPA.Agent: Send CMD to OS.

+

Send CMD to OS throught the pyOpenRPA.Agent daemon.

AgentOSFileBinaryDataBase64StrCreate(…)

pyOpenRPA.Agent: Create binary file by the base64 string (safe for JSON transmission) def OSFileBinaryDataBase64StrCreate(inFilePathStr, inFileDataBase64Str,inGSettings = None): Send binary file to Agent (base64 string)

@@ -236,7 +236,7 @@

Check if there is any running process that contains the given name processName.

ProcessListGet([inProcessNameWOExeList])

-

Return process list on the orchestrator machine.

+

Return process list on the orchestrator machine sorted by Memory Usage.

ProcessStart(inPathStr, inArgList[, …])

Start process locally.

@@ -257,7 +257,7 @@

Update alias for def (can be used in ActivityItem in field Def).

PythonStart(inModulePathStr, inDefNameStr[, …])

-

Python import module and start def

+

Import module and run def in the Orchestrator process.

RDPSessionCMDRun(inGSettings, …[, inModeStr])

Send command in RDP session

@@ -269,7 +269,7 @@

Disconnect the RDP session

RDPSessionDublicatesResolve(inGSettings)

-

Search dublicates in GSettings RDPlist !def is developing!

+

DEVELOPING Search dublicates in GSettings RDPlist !def is developing!

RDPSessionFileStoredRecieve(inGSettings, …)

Receive file from Session RDP to Host using shared drive in RDP

@@ -296,10 +296,10 @@

Check RDP Session responsibility TODO NEED DEV + TEST

RDPTemplateCreate(inLoginStr, inPasswordStr)

-

Create some RDP template dict to use it when connect/reconnect

+

Create RDP connect dict item/ Use it connect/reconnect (Orchestrator.RDPSessionConnect)

SchedulerActivityTimeAddWeekly(inGSettings)

-

Add activity in time weekly

+

Add activity item list in scheduler.

UACKeyListCheck(inRequest, inRoleKeyList)

Check is client is has access for the key list

@@ -359,7 +359,7 @@
pyOpenRPA.Orchestrator.__Orchestrator__.AgentOSCMD(inGSettings, inHostNameStr, inUserStr, inCMDStr, inRunAsyncBool=True)[source]
-

pyOpenRPA.Agent: Send CMD to OS. Result return to log + Orchestrator by the A2O connection +

Send CMD to OS throught the pyOpenRPA.Agent daemon. Result return to log + Orchestrator by the A2O connection def OSCMD(inCMDStr, inRunAsyncBool=True, inGSettings=None): Send to agent activity item to OSCMD

@@ -640,12 +640,13 @@ Create Activity Item for the agent

pyOpenRPA.Orchestrator.__Orchestrator__.ProcessListGet(inProcessNameWOExeList=None)[source]
-

Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it.

+

Return process list on the orchestrator machine sorted by Memory Usage. You can determine the list of the processes you are interested - def will return the list about it.

# USAGE
 from pyOpenRPA import Orchestrator
 
 lProcessList = Orchestrator.ProcessListGet()
-# Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.
+# Return the list of the process on the machine.
+# !ATTENTION! RUn orchestrator as administrator to get all process list on the machine.
 
@@ -912,19 +913,32 @@ Create Activity Item for the agent

pyOpenRPA.Orchestrator.__Orchestrator__.PythonStart(inModulePathStr, inDefNameStr, inArgList=None, inArgDict=None, inLogger=None)[source]
-

Python import module and start def

+

Import module and run def in the Orchestrator process.

+
+

Note

+

Import module will be each time when PythonStart def will be called.

+
+
# USAGE
+from pyOpenRPA import Orchestrator
+
+Orchestrator.PythonStart(
+    inModulePathStr="ModuleToCall.py", # inModulePathStr: Working Directory\ModuleToCall.py
+    inDefNameStr="TestDef")
+# Import module in Orchestrator process and call def "TestDef" from module "ModuleToCall.py"
+
+
Parameters
    -
  • inModulePathStr

  • -
  • inDefNameStr

  • -
  • inArgList

  • -
  • inArgDict

  • -
  • inLogger

  • +
  • inModulePathStr – Absolute or relative (working directory of the orchestrator process) path to the importing module .py

  • +
  • inDefNameStr – Def name in module

  • +
  • inArgList – List of the arguments for callable def

  • +
  • inArgDict – Dict of the named arguments for callable def

  • +
  • inLogger – Logger instance to log some information when PythonStart def is running

Returns
-

+

None

@@ -1008,7 +1022,7 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inP
pyOpenRPA.Orchestrator.__Orchestrator__.RDPSessionDublicatesResolve(inGSettings)[source]
-

Search dublicates in GSettings RDPlist +

DEVELOPING Search dublicates in GSettings RDPlist !def is developing!

Parameters
@@ -1170,23 +1184,71 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inP
pyOpenRPA.Orchestrator.__Orchestrator__.RDPTemplateCreate(inLoginStr, inPasswordStr, inHostStr='127.0.0.1', inPortInt=3389, inWidthPXInt=1680, inHeightPXInt=1050, inUseBothMonitorBool=False, inDepthBitInt=32, inSharedDriveList=None)[source]
-

Create some RDP template dict to use it when connect/reconnect

+

Create RDP connect dict item/ Use it connect/reconnect (Orchestrator.RDPSessionConnect)

+
# USAGE
+from pyOpenRPA import Orchestrator
+
+lRDPItemDict = Orchestrator.RDPTemplateCreate(
+    inLoginStr = "USER_99",
+    inPasswordStr = "USER_PASS_HERE",
+    inHostStr="127.0.0.1",
+    inPortInt = 3389,
+    inWidthPXInt = 1680,
+    inHeightPXInt = 1050,
+    inUseBothMonitorBool = False,
+    inDepthBitInt = 32,
+    inSharedDriveList=None)
+#     lRDPTemplateDict= {  # Init the configuration item
+#         "Host": "127.0.0.1", "Port": "3389", "Login": "USER_99", "Password": "USER_PASS_HERE",
+#         "Screen": { "Width": 1680, "Height": 1050, "FlagUseAllMonitors": False, "DepthBit": "32" },
+#         "SharedDriveList": ["c"],
+#         ###### Will updated in program ############
+#         "SessionHex": "77777sdfsdf77777dsfdfsf77777777",  # Hex is created when robot runs, example ""
+#         "SessionIsWindowExistBool": False, "SessionIsWindowResponsibleBool": False, "SessionIsIgnoredBool": False
+#     }
+
+
Parameters
    -
  • inLoginStr

  • -
  • inPasswordStr

  • -
  • inHostStr

  • -
  • inPortInt

  • -
  • inWidthPXInt

  • -
  • inHeightPXInt

  • -
  • inUseBothMonitorBool

  • -
  • inDepthBitInt

  • -
  • inSharedDriveList

  • +
  • inLoginStr – User/Robot Login, example “USER_99”

  • +
  • inPasswordStr – Password, example “USER_PASS_HERE”

  • +
  • inHostStr – Host address, example “77.77.22.22”

  • +
  • inPortInt – RDP Port, example “3389” (default)

  • +
  • inWidthPXInt – Width of the remote desktop in pixels, example 1680

  • +
  • inHeightPXInt – Height of the remote desktop in pixels, example 1050

  • +
  • inUseBothMonitorBool – True - connect to the RDP with both monitors. False - else case

  • +
  • inDepthBitInt – Remote desktop bitness. Available: 32 or 24 or 16 or 15, example 32

  • +
  • inSharedDriveList – Host local disc to connect to the RDP session. Example: [“c”, “d”]

Returns
-

+

+
{

“Host”: inHostStr, # Host address, example “77.77.22.22” +“Port”: str(inPortInt), # RDP Port, example “3389” +“Login”: inLoginStr, # Login, example “test” +“Password”: inPasswordStr, # Password, example “test” +“Screen”: {

+
+

”Width”: inWidthPXInt, # Width of the remote desktop in pixels, example 1680 +“Height”: inHeightPXInt, # Height of the remote desktop in pixels, example 1050 +# “640x480” or “1680x1050” or “FullScreen”. If Resolution not exists set full screen, example +“FlagUseAllMonitors”: inUseBothMonitorBool, # True or False, example False +“DepthBit”: str(inDepthBitInt) # “32” or “24” or “16” or “15”, example “32”

+
+

}, +“SharedDriveList”: inSharedDriveList, # List of the Root sesion hard drives, example [“c”] +###### Will updated in program ############ +“SessionHex”: “77777sdfsdf77777dsfdfsf77777777”, # Hex is created when robot runs, example “” +“SessionIsWindowExistBool”: False, +# Flag if the RDP window is exist, old name “FlagSessionIsActive”. Check every n seconds , example False +“SessionIsWindowResponsibleBool”: False, +# Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too , example False +“SessionIsIgnoredBool”: False # Flag to ignore RDP window False - dont ignore, True - ignore, example False

+
+
+

}

+

@@ -1194,18 +1256,38 @@ Var 2 (Backward compatibility): inGSettings, inRDPSessionKeyStr, inHostStr, inP
pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly(inGSettings, inTimeHHMMStr='23:55:', inWeekdayList=None, inActivityList=None)[source]
-

Add activity in time weekly

+

Add activity item list in scheduler. You can set weekday list and set time when launch. Activity list will be executed at planned time/day.

+
# USAGE
+from pyOpenRPA import Orchestrator
+
+# EXAMPLE 1
+def TestDef(inArg1Str):
+    pass
+lActivityItem = Orchestrator.ProcessorActivityItemCreate(
+    inDef = TestDef,
+    inArgList=[],
+    inArgDict={"inArg1Str": "ArgValueStr"},
+    inArgGSettingsStr = None,
+    inArgLoggerStr = None)
+Orchestrator.SchedulerActivityTimeAddWeekly(
+    inGSettings = gSettingsDict,
+    inTimeHHMMStr = "04:34",
+    inWeekdayList=[2,3,4],
+    inActivityList = [lActivityItem])
+# Activity will be executed at 04:34 Wednesday (2), thursday (3), friday (4)
+
+
Parameters
  • inGSettings – Global settings dict (singleton)

  • -
  • inTimeHHMMStr

  • -
  • inWeekdayList

  • -
  • inActivityList

  • +
  • inTimeHHMMStr – Activation time from “00:00” to “23:59”. Example: “05:29”

  • +
  • inWeekdayList – Week day list to initiate activity list. Use int from 0 (monday) to 6 (sunday) as list items. Example: [0,1,2,3,4]. Default value is everyday ([0,1,2,3,4,5,6])

  • +
  • inActivityList – Activity list structure

Returns
-

+

None

diff --git a/Wiki/ENG_Guide/html/Robot/01_Robot.html b/Wiki/ENG_Guide/html/Robot/01_Robot.html index 907b7f44..bd0c15de 100644 --- a/Wiki/ENG_Guide/html/Robot/01_Robot.html +++ b/Wiki/ENG_Guide/html/Robot/01_Robot.html @@ -174,6 +174,141 @@

pyOpenRPA Robot is the python package.

pyOpenRPA Robot

+
+
+pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt()[source]
+

Detect OS bitness.

+
+
Returns
+

int 32 or int 64

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication(inControlSpecificationArray)[source]
+

#Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element

+
+
Parameters
+

inControlSpecificationArray – List of dict, dict in pywinauto.find_windows notation

+
+
Returns
+

process application object

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO(inControlSpecificationArray)[source]
+

#Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element +#old name - GetControl

+
+
Parameters
+

inControlSpecificationArray – List of dict, dict in pywinauto.find_windows notation

+
+
Returns
+

list of UIO object

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool(inSpecificationList, inWaitSecs)[source]
+

Wait for UI object will appear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationList – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]

  • +
  • inWaitSecs – Float value (seconds) for wait UI element appear in GUI

  • +
+
+
Returns
+

True - UI object will appear. False - else case

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool(inSpecificationList, inWaitSecs)[source]
+

Wait for UI object will disappear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationList – UIOSelector. +Example: [{“title”:”notepad”},{“title”:”OK”}]

  • +
  • inWaitSecs – Float value (seconds) for wait UI element disappear in GUI

  • +
+
+
Returns
+

True - UI object will disappear. False - else case

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector)[source]
+

Check if object is exist by the UIO selector.

+
+
Parameters
+

inUIOSelector

+
+
Returns
+

True - Object is exist. False - else case

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList)[source]
+

Detect process bitness by the UI Object UIO Selector.

+
+
Parameters
+

inSpecificationList – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]

+
+
Returns
+

int 32 or int 64

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr(inSpecificationList)[source]
+

Detect process bitness by the UI Object UIO Selector.

+
+
Parameters
+

inSpecificationList – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]

+
+
Returns
+

str “32” or str “64”

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO(inSpecificationList, inElement=None, inFlagRaiseException=True)[source]
+

Get the pywinauto object by the UIO selector.

+
+
Parameters
+
    +
  • inSpecificationList

  • +
  • inElement

  • +
  • inFlagRaiseException

  • +
+
+
Returns
+

+
+
+
+
pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True)[source]
@@ -192,6 +327,103 @@
+
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector)[source]
+

Safe get other process or None if destination app is the other/same bitness

+
+
Parameters
+

inUIOSelector – UIO Selector of the UI object

+
+
Returns
+

None or process (of the other bitness)

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO(inElementSpecification)[source]
+

UIOSelector (see description on the top of the document) +#old name - AutomationSearchMouseElement

+
+
Parameters
+

inElementSpecification – UIOSelector of the UI Object

+
+
Returns
+

pywinauto element wrapper instance or None

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector)[source]
+

!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!

+
+
Parameters
+

inUIOSelector – UIOSelector of the UI Object

+
+
Returns
+

?

+

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)[source]
+

Wait for many UI object will appear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationListList

    UIOSelector list. +Example: [

    +
    +

    [{“title”:”notepad”},{“title”:”OK”}], +[{“title”:”notepad”},{“title”:”Cancel”}]

    +
    +

    ]

    +

  • +
  • inWaitSecs – Float value (seconds) for wait UI element appear in GUI

  • +
  • inFlagWaitAllInMoment – True - Wait all UI objects from the UIOSelector list to be appeared

  • +
+
+
Returns
+

List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}]

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)[source]
+

Wait for many UI object will disappear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationListList

    UIOSelector list. +Example: [

    +
    +

    [{“title”:”notepad”},{“title”:”OK”}], +[{“title”:”notepad”},{“title”:”Cancel”}]

    +
    +

    ]

    +

  • +
  • inWaitSecs – Float value (seconds) for wait UI element disappear in GUI

  • +
  • inFlagWaitAllInMoment – True - Wait all UI objects from the UIOSelector list to be disappeared.

  • +
+
+
Returns
+

List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}]

+
+
Returns
+

+
+
+
+ diff --git a/Wiki/ENG_Guide/html/Robot/02_Defs.html b/Wiki/ENG_Guide/html/Robot/02_Defs.html index 41f9c470..bacdf032 100644 --- a/Wiki/ENG_Guide/html/Robot/02_Defs.html +++ b/Wiki/ENG_Guide/html/Robot/02_Defs.html @@ -191,11 +191,188 @@ -

UIOSelector_Get_UIOList(inSpecificationList)

+

Get_OSBitnessInt()

+

Detect OS bitness.

+ +

PWASpecification_Get_PWAApplication(…)

+

#Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element

+ +

PWASpecification_Get_UIO(…)

+

#Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element #old name - GetControl

+ +

UIOSelectorSecs_WaitAppear_Bool(…)

+

Wait for UI object will appear in GUI for inWaitSecs seconds.

+ +

UIOSelectorSecs_WaitDisappear_Bool(…)

+

Wait for UI object will disappear in GUI for inWaitSecs seconds.

+ +

UIOSelector_Exist_Bool(inUIOSelector)

+

Check if object is exist by the UIO selector.

+ +

UIOSelector_Get_BitnessInt(inSpecificationList)

+

Detect process bitness by the UI Object UIO Selector.

+ +

UIOSelector_Get_BitnessStr(inSpecificationList)

+

Detect process bitness by the UI Object UIO Selector.

+ +

UIOSelector_Get_UIO(inSpecificationList[, …])

+

Get the pywinauto object by the UIO selector.

+ +

UIOSelector_Get_UIOList(inSpecificationList)

Get the UIO list by the selector

+

UIOSelector_SafeOtherGet_Process(inUIOSelector)

+

Safe get other process or None if destination app is the other/same bitness

+ +

UIOSelector_SearchChildByMouse_UIO(…)

+

UIOSelector (see description on the top of the document) #old name - AutomationSearchMouseElement

+ +

UIOSelector_SearchChildByMouse_UIOTree(…)

+

!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!

+ +

UIOSelectorsSecs_WaitAppear_List(…[, …])

+

Wait for many UI object will appear in GUI for inWaitSecs seconds.

+ +

UIOSelectorsSecs_WaitDisappear_List(…[, …])

+

Wait for many UI object will disappear in GUI for inWaitSecs seconds.

+ +
+
+pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt()[source]
+

Detect OS bitness.

+
+
Returns
+

int 32 or int 64

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication(inControlSpecificationArray)[source]
+

#Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element

+
+
Parameters
+

inControlSpecificationArray – List of dict, dict in pywinauto.find_windows notation

+
+
Returns
+

process application object

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO(inControlSpecificationArray)[source]
+

#Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element +#old name - GetControl

+
+
Parameters
+

inControlSpecificationArray – List of dict, dict in pywinauto.find_windows notation

+
+
Returns
+

list of UIO object

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool(inSpecificationList, inWaitSecs)[source]
+

Wait for UI object will appear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationList – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]

  • +
  • inWaitSecs – Float value (seconds) for wait UI element appear in GUI

  • +
+
+
Returns
+

True - UI object will appear. False - else case

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool(inSpecificationList, inWaitSecs)[source]
+

Wait for UI object will disappear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationList – UIOSelector. +Example: [{“title”:”notepad”},{“title”:”OK”}]

  • +
  • inWaitSecs – Float value (seconds) for wait UI element disappear in GUI

  • +
+
+
Returns
+

True - UI object will disappear. False - else case

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector)[source]
+

Check if object is exist by the UIO selector.

+
+
Parameters
+

inUIOSelector

+
+
Returns
+

True - Object is exist. False - else case

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList)[source]
+

Detect process bitness by the UI Object UIO Selector.

+
+
Parameters
+

inSpecificationList – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]

+
+
Returns
+

int 32 or int 64

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr(inSpecificationList)[source]
+

Detect process bitness by the UI Object UIO Selector.

+
+
Parameters
+

inSpecificationList – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]

+
+
Returns
+

str “32” or str “64”

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO(inSpecificationList, inElement=None, inFlagRaiseException=True)[source]
+

Get the pywinauto object by the UIO selector.

+
+
Parameters
+
    +
  • inSpecificationList

  • +
  • inElement

  • +
  • inFlagRaiseException

  • +
+
+
Returns
+

+
+
+
+
pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True)[source]
@@ -214,6 +391,103 @@
+
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector)[source]
+

Safe get other process or None if destination app is the other/same bitness

+
+
Parameters
+

inUIOSelector – UIO Selector of the UI object

+
+
Returns
+

None or process (of the other bitness)

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO(inElementSpecification)[source]
+

UIOSelector (see description on the top of the document) +#old name - AutomationSearchMouseElement

+
+
Parameters
+

inElementSpecification – UIOSelector of the UI Object

+
+
Returns
+

pywinauto element wrapper instance or None

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector)[source]
+

!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!

+
+
Parameters
+

inUIOSelector – UIOSelector of the UI Object

+
+
Returns
+

?

+

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)[source]
+

Wait for many UI object will appear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationListList

    UIOSelector list. +Example: [

    +
    +

    [{“title”:”notepad”},{“title”:”OK”}], +[{“title”:”notepad”},{“title”:”Cancel”}]

    +
    +

    ]

    +

  • +
  • inWaitSecs – Float value (seconds) for wait UI element appear in GUI

  • +
  • inFlagWaitAllInMoment – True - Wait all UI objects from the UIOSelector list to be appeared

  • +
+
+
Returns
+

List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}]

+
+
+
+ +
+
+pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)[source]
+

Wait for many UI object will disappear in GUI for inWaitSecs seconds.

+
+
Parameters
+
    +
  • inSpecificationListList

    UIOSelector list. +Example: [

    +
    +

    [{“title”:”notepad”},{“title”:”OK”}], +[{“title”:”notepad”},{“title”:”Cancel”}]

    +
    +

    ]

    +

  • +
  • inWaitSecs – Float value (seconds) for wait UI element disappear in GUI

  • +
  • inFlagWaitAllInMoment – True - Wait all UI objects from the UIOSelector list to be disappeared.

  • +
+
+
Returns
+

List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}]

+
+
Returns
+

+
+
+
+

References

diff --git a/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html b/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html index fd0bc92d..92ccbe04 100644 --- a/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html +++ b/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Orchestrator/__Orchestrator__.html @@ -216,7 +216,7 @@
[docs]def AgentOSCMD(inGSettings, inHostNameStr, inUserStr, inCMDStr, inRunAsyncBool=True): """ - pyOpenRPA.Agent: Send CMD to OS. Result return to log + Orchestrator by the A2O connection + Send CMD to OS throught the pyOpenRPA.Agent daemon. Result return to log + Orchestrator by the A2O connection def OSCMD(inCMDStr, inRunAsyncBool=True, inGSettings=None): Send to agent activity item to OSCMD @@ -1020,7 +1020,7 @@
[docs]def ProcessListGet(inProcessNameWOExeList=None): """ - Return process list on the orchestrator machine. You can determine the list of the processes you are interested - def will return the list about it. + Return process list on the orchestrator machine sorted by Memory Usage. You can determine the list of the processes you are interested - def will return the list about it. .. code-block:: python @@ -1028,7 +1028,8 @@ from pyOpenRPA import Orchestrator lProcessList = Orchestrator.ProcessListGet() - # Return the list of the process on the machine. !ATTENTION! RUn orchestrator as administrator to get all process list on the machine. + # Return the list of the process on the machine. + # !ATTENTION! RUn orchestrator as administrator to get all process list on the machine. :param inProcessNameWOExeList: :return: { @@ -1046,7 +1047,6 @@ """ if inProcessNameWOExeList is None: inProcessNameWOExeList = [] - '''Get list of running process sorted by Memory Usage and filtered by inProcessNameWOExeList''' lMapUPPERInput = {} # Mapping for processes WO exe lResult = {"ProcessWOExeList":[], "ProcessWOExeUpperList":[],"ProcessDetailList":[]} # Create updated list for quick check @@ -1078,14 +1078,28 @@ # Python def - start module function
[docs]def PythonStart(inModulePathStr, inDefNameStr, inArgList=None, inArgDict=None, inLogger = None): """ - Python import module and start def + Import module and run def in the Orchestrator process. - :param inModulePathStr: - :param inDefNameStr: - :param inArgList: - :param inArgDict: - :param inLogger: - :return: + .. note:: + + Import module will be each time when PythonStart def will be called. + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + Orchestrator.PythonStart( + inModulePathStr="ModuleToCall.py", # inModulePathStr: Working Directory\\ModuleToCall.py + inDefNameStr="TestDef") + # Import module in Orchestrator process and call def "TestDef" from module "ModuleToCall.py" + + :param inModulePathStr: Absolute or relative (working directory of the orchestrator process) path to the importing module .py + :param inDefNameStr: Def name in module + :param inArgList: List of the arguments for callable def + :param inArgDict: Dict of the named arguments for callable def + :param inLogger: Logger instance to log some information when PythonStart def is running + :return: None """ if inArgList is None: inArgList=[] if inArgDict is None: inArgDict={} @@ -1096,23 +1110,42 @@ except Exception as e: if inLogger: inLogger.exception("Loop activity error: module/function not founded")
-# # # # # # # # # # # # # # # # # # # # # # # - # # # # # # # # # # # # # # # # # # # # # # # # Scheduler # # # # # # # # # # # # # # # # # # # # # # #
[docs]def SchedulerActivityTimeAddWeekly(inGSettings, inTimeHHMMStr="23:55:", inWeekdayList=None, inActivityList=None): """ - Add activity in time weekly + Add activity item list in scheduler. You can set weekday list and set time when launch. Activity list will be executed at planned time/day. + + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + # EXAMPLE 1 + def TestDef(inArg1Str): + pass + lActivityItem = Orchestrator.ProcessorActivityItemCreate( + inDef = TestDef, + inArgList=[], + inArgDict={"inArg1Str": "ArgValueStr"}, + inArgGSettingsStr = None, + inArgLoggerStr = None) + Orchestrator.SchedulerActivityTimeAddWeekly( + inGSettings = gSettingsDict, + inTimeHHMMStr = "04:34", + inWeekdayList=[2,3,4], + inActivityList = [lActivityItem]) + # Activity will be executed at 04:34 Wednesday (2), thursday (3), friday (4) :param inGSettings: Global settings dict (singleton) - :param inTimeHHMMStr: - :param inWeekdayList: - :param inActivityList: - :return: + :param inTimeHHMMStr: Activation time from "00:00" to "23:59". Example: "05:29" + :param inWeekdayList: Week day list to initiate activity list. Use int from 0 (monday) to 6 (sunday) as list items. Example: [0,1,2,3,4]. Default value is everyday ([0,1,2,3,4,5,6]) + :param inActivityList: Activity list structure + :return: None """ - if inWeekdayList is None: inWeekdayList=[] + if inWeekdayList is None: inWeekdayList=[0,1,2,3,4,5,6] if inActivityList is None: inActivityList=[] Processor.__ActivityListVerify__(inActivityList=inActivityList) # DO VERIFICATION FOR THE inActivityList lActivityTimeItemDict = { @@ -1130,18 +1163,64 @@
[docs]def RDPTemplateCreate(inLoginStr, inPasswordStr, inHostStr="127.0.0.1", inPortInt = 3389, inWidthPXInt = 1680, inHeightPXInt = 1050, inUseBothMonitorBool = False, inDepthBitInt = 32, inSharedDriveList=None): """ - Create some RDP template dict to use it when connect/reconnect + Create RDP connect dict item/ Use it connect/reconnect (Orchestrator.RDPSessionConnect) - :param inLoginStr: - :param inPasswordStr: - :param inHostStr: - :param inPortInt: - :param inWidthPXInt: - :param inHeightPXInt: - :param inUseBothMonitorBool: - :param inDepthBitInt: - :param inSharedDriveList: + .. code-block:: python + + # USAGE + from pyOpenRPA import Orchestrator + + lRDPItemDict = Orchestrator.RDPTemplateCreate( + inLoginStr = "USER_99", + inPasswordStr = "USER_PASS_HERE", + inHostStr="127.0.0.1", + inPortInt = 3389, + inWidthPXInt = 1680, + inHeightPXInt = 1050, + inUseBothMonitorBool = False, + inDepthBitInt = 32, + inSharedDriveList=None) + # lRDPTemplateDict= { # Init the configuration item + # "Host": "127.0.0.1", "Port": "3389", "Login": "USER_99", "Password": "USER_PASS_HERE", + # "Screen": { "Width": 1680, "Height": 1050, "FlagUseAllMonitors": False, "DepthBit": "32" }, + # "SharedDriveList": ["c"], + # ###### Will updated in program ############ + # "SessionHex": "77777sdfsdf77777dsfdfsf77777777", # Hex is created when robot runs, example "" + # "SessionIsWindowExistBool": False, "SessionIsWindowResponsibleBool": False, "SessionIsIgnoredBool": False + # } + + :param inLoginStr: User/Robot Login, example "USER_99" + :param inPasswordStr: Password, example "USER_PASS_HERE" + :param inHostStr: Host address, example "77.77.22.22" + :param inPortInt: RDP Port, example "3389" (default) + :param inWidthPXInt: Width of the remote desktop in pixels, example 1680 + :param inHeightPXInt: Height of the remote desktop in pixels, example 1050 + :param inUseBothMonitorBool: True - connect to the RDP with both monitors. False - else case + :param inDepthBitInt: Remote desktop bitness. Available: 32 or 24 or 16 or 15, example 32 + :param inSharedDriveList: Host local disc to connect to the RDP session. Example: ["c", "d"] :return: + { + "Host": inHostStr, # Host address, example "77.77.22.22" + "Port": str(inPortInt), # RDP Port, example "3389" + "Login": inLoginStr, # Login, example "test" + "Password": inPasswordStr, # Password, example "test" + "Screen": { + "Width": inWidthPXInt, # Width of the remote desktop in pixels, example 1680 + "Height": inHeightPXInt, # Height of the remote desktop in pixels, example 1050 + # "640x480" or "1680x1050" or "FullScreen". If Resolution not exists set full screen, example + "FlagUseAllMonitors": inUseBothMonitorBool, # True or False, example False + "DepthBit": str(inDepthBitInt) # "32" or "24" or "16" or "15", example "32" + }, + "SharedDriveList": inSharedDriveList, # List of the Root sesion hard drives, example ["c"] + ###### Will updated in program ############ + "SessionHex": "77777sdfsdf77777dsfdfsf77777777", # Hex is created when robot runs, example "" + "SessionIsWindowExistBool": False, + # Flag if the RDP window is exist, old name "FlagSessionIsActive". Check every n seconds , example False + "SessionIsWindowResponsibleBool": False, + # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too , example False + "SessionIsIgnoredBool": False # Flag to ignore RDP window False - dont ignore, True - ignore, example False + } + """ if inSharedDriveList is None: inSharedDriveList = ["c"] lRDPTemplateDict= { # Init the configuration item @@ -1171,7 +1250,7 @@ # Return list if dublicates
[docs]def RDPSessionDublicatesResolve(inGSettings): """ - Search dublicates in GSettings RDPlist + DEVELOPING Search dublicates in GSettings RDPlist !def is developing! :param inGSettings: Global settings dict (singleton) diff --git a/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Robot/UIDesktop.html b/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Robot/UIDesktop.html index de274589..c0f1ea67 100644 --- a/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Robot/UIDesktop.html +++ b/Wiki/ENG_Guide/html/_modules/pyOpenRPA/Robot/UIDesktop.html @@ -404,7 +404,15 @@ #inElement - Входной элемент - показатель, что не требуется выполнять коннект к процессу #inFlagRaiseException - Флаг True - выкинуть ошибку в случае обнаружении пустого списка #old name - PywinautoExtElementGet -def UIOSelector_Get_UIO (inSpecificationList,inElement=None,inFlagRaiseException=True): +
[docs]def UIOSelector_Get_UIO (inSpecificationList,inElement=None,inFlagRaiseException=True): + ''' + Get the pywinauto object by the UIO selector. + + :param inSpecificationList: + :param inElement: + :param inFlagRaiseException: + :return: + ''' lResult=None #Получить родительский объект если на вход ничего не поступило lResultList=UIOSelector_Get_UIOList(inSpecificationList,inElement,False) @@ -413,13 +421,19 @@ #Условие, если результирующий список пустой и установлен флаг создания ошибки (и inElement is None - не следствие рекурсивного вызова) if lResult is None and inFlagRaiseException: raise pywinauto.findwindows.ElementNotFoundError("Robot can't find element by the UIOSelector") - return lResult + return lResult
################################################################################################# #Check if UIO exist (Identified by the UIOSelector) #!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #UIOSelector #old name - - -def UIOSelector_Exist_Bool (inUIOSelector): +
[docs]def UIOSelector_Exist_Bool (inUIOSelector): + ''' + Check if object is exist by the UIO selector. + + :param inUIOSelector: + :return: True - Object is exist. False - else case + ''' lResult=False #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) @@ -442,7 +456,7 @@ f"Exception was occured in child process (message): {lPIPEResponseDict['ErrorMessage']}, (traceback): {lPIPEResponseDict['ErrorTraceback']}") else: lResult = lPIPEResponseDict["Result"] - return lResult + return lResult
################################################################################################# #Wait for UIO is appear (at least one of them or all at the same time) #inSpecificationListList - List of the UIOSelector @@ -452,7 +466,19 @@ #old name - - #####Внимание##### ##Функция ожидания появления элементов (тк элементы могут быть недоступны, неизвестно в каком фреймворке каждый из них может появиться) -def UIOSelectorsSecs_WaitAppear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False): +
[docs]def UIOSelectorsSecs_WaitAppear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False): + ''' + Wait for many UI object will appear in GUI for inWaitSecs seconds. + + :param inSpecificationListList: UIOSelector list. + Example: [ + [{"title":"notepad"},{"title":"OK"}], + [{"title":"notepad"},{"title":"Cancel"}] + ] + :param inWaitSecs: Float value (seconds) for wait UI element appear in GUI + :param inFlagWaitAllInMoment: True - Wait all UI objects from the UIOSelector list to be appeared + :return: List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{"title":"notepad"},{"title":"Cancel"}] + ''' lResultFlag=False lSecsSleep = 1 #Настроечный параметр lSecsDone = 0 @@ -481,7 +507,7 @@ if lResultFlag == False: lSecsDone=lSecsDone+lSecsSleep time.sleep(lSecsSleep) - return lResultList + return lResultList
################################################################################################# #Wait for UIO is Disappear (at least one of them or all at the same time) #inSpecificationListList - List of the UIOSelector @@ -491,7 +517,20 @@ #old name - - #####Внимание##### ##Функция ожидания пропажи элементов (тк элементы могут быть недоступны, неизвестно в каком фреймворке каждый из них может появиться) -def UIOSelectorsSecs_WaitDisappear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False): +
[docs]def UIOSelectorsSecs_WaitDisappear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False): + ''' + Wait for many UI object will disappear in GUI for inWaitSecs seconds. + + :param inSpecificationListList: UIOSelector list. + Example: [ + [{"title":"notepad"},{"title":"OK"}], + [{"title":"notepad"},{"title":"Cancel"}] + ] + :param inWaitSecs: Float value (seconds) for wait UI element disappear in GUI + :param inFlagWaitAllInMoment: True - Wait all UI objects from the UIOSelector list to be disappeared. + :return: List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{"title":"notepad"},{"title":"Cancel"}] + :return: + ''' lResultFlag=False lSecsSleep = 1 #Настроечный параметр lSecsDone = 0 @@ -520,37 +559,58 @@ if lResultFlag == False: lSecsDone=lSecsDone+lSecsSleep time.sleep(lSecsSleep) - return lResultList + return lResultList
################################################################################################# #Wait for UIO is appear (at least one of them or all at the same time) #inSpecificationList - UIOSelector #inWaitSecs - Время ожидания объекта в секундах #return: Bool - True - UIO is appear #old name - - -def UIOSelectorSecs_WaitAppear_Bool (inSpecificationList,inWaitSecs): +
[docs]def UIOSelectorSecs_WaitAppear_Bool (inSpecificationList,inWaitSecs): + ''' + Wait for UI object will appear in GUI for inWaitSecs seconds. + + :param inSpecificationList: UIOSelector. Example: [{"title":"notepad"},{"title":"OK"}] + :param inWaitSecs: Float value (seconds) for wait UI element appear in GUI + :return: True - UI object will appear. False - else case + ''' lWaitAppearList=UIOSelectorsSecs_WaitAppear_List([inSpecificationList],inWaitSecs) lResult=False if len(lWaitAppearList)>0: lResult=True - return lResult + return lResult
################################################################################################# #Wait for UIO is disappear (at least one of them or all at the same time) #inSpecificationList - UIOSelector #inWaitSecs - Время ожидания пропажи объекта в секундах #return: Bool - True - UIO is Disappear #old name - - -def UIOSelectorSecs_WaitDisappear_Bool (inSpecificationList,inWaitSecs): +
[docs]def UIOSelectorSecs_WaitDisappear_Bool (inSpecificationList,inWaitSecs): + ''' + Wait for UI object will disappear in GUI for inWaitSecs seconds. + + :param inSpecificationList: UIOSelector. + Example: [{"title":"notepad"},{"title":"OK"}] + :param inWaitSecs: Float value (seconds) for wait UI element disappear in GUI + :return: True - UI object will disappear. False - else case + ''' lWaitDisappearList=UIOSelectorsSecs_WaitDisappear_List([inSpecificationList],inWaitSecs) lResult=False if len(lWaitDisappearList)>0: lResult=True - return lResult + return lResult
################################################################################################# #Get process bitness (32 or 64) #inSpecificationList - UIOSelector #old name - None #return None (if Process not found), int 32, or int 64 -def UIOSelector_Get_BitnessInt (inSpecificationList): +
[docs]def UIOSelector_Get_BitnessInt (inSpecificationList): + ''' + Detect process bitness by the UI Object UIO Selector. + + :param inSpecificationList: UIOSelector. Example: [{"title":"notepad"},{"title":"OK"}] + :return: int 32 or int 64 + ''' lResult=None #Получить объект Application (Для проверки разрядности) lRootElement=PWASpecification_Get_PWAApplication(inSpecificationList) @@ -559,13 +619,19 @@ lResult=64 else: lResult=32 - return lResult + return lResult
################################################################################################# #Get process bitness ("32" or "64") #inSpecificationList - UIOSelector #old name - None #return None (if Process not found), int 32, or int 64 -def UIOSelector_Get_BitnessStr (inSpecificationList): +
[docs]def UIOSelector_Get_BitnessStr (inSpecificationList): + ''' + Detect process bitness by the UI Object UIO Selector. + + :param inSpecificationList: UIOSelector. Example: [{"title":"notepad"},{"title":"OK"}] + :return: str "32" or str "64" + ''' lResult=None #Получить объект Application (Для проверки разрядности) lRootElement=PWASpecification_Get_PWAApplication(inSpecificationList) @@ -574,21 +640,29 @@ lResult="64" else: lResult="32" - return lResult + return lResult
################################################################################################# #Get OS bitness (32 or 64) #old name - None #return int 32, or int 64 -def Get_OSBitnessInt (): - lResult=32; +
[docs]def Get_OSBitnessInt (): + ''' + Detect OS bitness. + + :return: int 32 or int 64 + ''' + lResult=32 if pywinauto.sysinfo.is_x64_OS(): - lResult=64; - return lResult; + lResult=64 + return lResult
################################################################################################# -#Safe get other process or None if destination app is the other/same bitness -#inUIOSelector - selector of the destination -#return None or process (of the other bitness) -def UIOSelector_SafeOtherGet_Process(inUIOSelector): +
[docs]def UIOSelector_SafeOtherGet_Process(inUIOSelector): + ''' + Safe get other process or None if destination app is the other/same bitness + + :param inUIOSelector: UIO Selector of the UI object + :return: None or process (of the other bitness) + ''' #Default value lResult = None #Go check bitness if selector exists @@ -597,13 +671,16 @@ lUIOSelectorAppBitness = UIOSelector_Get_BitnessStr(inUIOSelector) if lUIOSelectorAppBitness and Utils.ProcessBitness.mSettingsDict["BitnessProcessCurrent"] != lUIOSelectorAppBitness: lResult = Utils.ProcessBitness.OtherProcessGet() - return lResult + return lResult
################################################################################################## -#inControlSpecificationArray - List of dict, dict in pywinauto.find_windows notation -#Backend selection - attribute "backend" ("win32" || "uia") in 1-st list element -#return list of UIO object -#old name - GetControl -def PWASpecification_Get_UIO(inControlSpecificationArray): +
[docs]def PWASpecification_Get_UIO(inControlSpecificationArray): + ''' + #Backend def selection - attribute "backend" ("win32" || "uia") in 1-st list element + #old name - GetControl + + :param inControlSpecificationArray: List of dict, dict in pywinauto.find_windows notation + :return: list of UIO object + ''' #Определение backend lBackend=mDefaultPywinautoBackend if "backend" in inControlSpecificationArray[0]: @@ -613,7 +690,7 @@ inControlSpecificationOriginArray=copy.deepcopy(inControlSpecificationArray) inControlSpecificationArray=UIOSelector_SearchProcessNormalize_UIOSelector(inControlSpecificationArray) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] lTempObject=None if len(inControlSpecificationArray) > 0: #Сформировать выборку элементов, которые подходят под первый уровень спецификации @@ -648,13 +725,15 @@ lTempObject=lTempObject.window(**lWindowSpecification) #Добавить объект в результирующий массив lResultList.append(lTempObject) - return lResultList + return lResultList
################################################################################################## -#inControlSpecificationArray - List of dict, dict in pywinauto.find_windows notation -#Backend selection - attribute "backend" ("win32" || "uia") in 1-st list element -#return process application object -#old name - None -def PWASpecification_Get_PWAApplication(inControlSpecificationArray): +
[docs]def PWASpecification_Get_PWAApplication(inControlSpecificationArray): + ''' + #Backend selection - attribute "backend" ("win32" || "uia") in 1-st list element + + :param inControlSpecificationArray: List of dict, dict in pywinauto.find_windows notation + :return: process application object + ''' inControlSpecificationArray=copy.deepcopy(inControlSpecificationArray) #Определение backend lBackend=mDefaultPywinautoBackend @@ -665,7 +744,7 @@ inControlSpecificationOriginArray=inControlSpecificationArray inControlSpecificationArray=UIOSelector_SearchProcessNormalize_UIOSelector(inControlSpecificationArray) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] lTempObject=None if len(inControlSpecificationArray) > 0: #Выполнить подключение к объекту @@ -683,13 +762,17 @@ #lTempObject=lRPAApplication.window(**inControlSpecificationArray[0]) #Скорректировано из-за недопонимания структуры lTempObject=lRPAApplication - return lTempObject + return lTempObject
########################################################################################################### -#inElementSpecificationList = UIOSelector (see description on the top of the document) -#result = pywinauto element wrapper instance or None -#old name - AutomationSearchMouseElement -def UIOSelector_SearchChildByMouse_UIO(inElementSpecification): +
[docs]def UIOSelector_SearchChildByMouse_UIO(inElementSpecification): + ''' + UIOSelector (see description on the top of the document) + #old name - AutomationSearchMouseElement + + :param inElementSpecification: UIOSelector of the UI Object + :return: pywinauto element wrapper instance or None + ''' lGUISearchElementSelected=None #Настройка - частота обновления подсвечивания lTimeSleepSeconds=0.4 @@ -721,17 +804,21 @@ UIO_Highlight(lElementFounded) else: #Была нажата клавиша Ctrl - выйти из цикла - lFlagLoop=False; + lFlagLoop=False #Заснуть до следующего цикла time.sleep(lTimeSleepSeconds) #Вернуть результат поиска - return lElementFoundedList + return lElementFoundedList
#################################################################################################### -#inElementSpecification - UIOSelector -#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #old name - AutomationSearchMouseElementHierarchy -def UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector): +
[docs]def UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector): + ''' + !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! + + :param inUIOSelector: UIOSelector of the UI Object + :return: ? + ''' lItemInfo = [] #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) @@ -790,7 +877,7 @@ else: lItemInfo = lPIPEResponseDict["Result"] #Вернуть результат - return lItemInfo + return lItemInfo
#################################################################################################### #inElement- UIO (UI Object) #old name - PywinautoExtElementCtrlIndexGet @@ -915,7 +1002,9 @@ #inUIOSelector #inActionName - UIOActivity (name) from Pywinauto #old name - ElementRunAction -def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=[], inkwArgumentObject={}): +def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=None, inkwArgumentObject=None): + if inArgumentList is None: inArgumentList=[] # 2021 02 22 Minor fix by Ivan Maslov + if inkwArgumentObject is None: inkwArgumentObject={} # 2021 02 22 Minor fix by Ivan Maslov lResult={} #Check the bitness lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) @@ -969,7 +1058,7 @@ #Подготовка входного массива inUIOSelector=UIOSelector_SearchUIONormalize_UIOSelector(inUIOSelector) #Выполнить идентификацию объектов, если передан массив - lResultList=[]; + lResultList=[] if len(inUIOSelector) > 0: #Получить объект lTempObject=UIOSelector_Get_UIO(inUIOSelector) @@ -997,7 +1086,8 @@ #inHierarchyList: [{"index":<>,"element":<>}] - technical argument for internal purpose #result -List of dict [{"index":<>,"element":<>}] -- list of element hierarchy specifications #old name - GUISearchElementByRootXY -def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=[]): +def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=None): + if inHierarchyList is None: inHierarchyList = [] #Инициализация результирующего значения lResultElement = None lResultElementX1 = None @@ -1086,7 +1176,8 @@ #!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #inControlSpecificationArray- UIOSelector #old name - ElementGetChildElementList -def UIOSelector_GetChildList_UIOList(inUIOSelector=[], inBackend=mDefaultPywinautoBackend): +def UIOSelector_GetChildList_UIOList(inUIOSelector=None, inBackend=mDefaultPywinautoBackend): + if inUIOSelector is None: inUIOSelector = [] #mRobotLogger.info(f"File!!!!") #mRobotLogger.info(f"inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}") #pdb.set_trace() @@ -1367,7 +1458,7 @@ lResultList2=[] for lI in lResultList: lTempObjectInfo=lI - lResultList2.append(UIOEI_Convert_UIOInfo(lI)); + lResultList2.append(UIOEI_Convert_UIOInfo(lI)) return lResultList2 ################################################################################################### diff --git a/Wiki/ENG_Guide/html/genindex.html b/Wiki/ENG_Guide/html/genindex.html index c1f6315a..925d1b02 100644 --- a/Wiki/ENG_Guide/html/genindex.html +++ b/Wiki/ENG_Guide/html/genindex.html @@ -198,6 +198,8 @@

G

- + - +
diff --git a/Wiki/ENG_Guide/html/objects.inv b/Wiki/ENG_Guide/html/objects.inv index 8cf845090abb371c8837748d8024933d751d8cd9..609203dff06aa7ccacfd42eaf1125e93aaf74f61 100644 GIT binary patch delta 942 zcmV;f15x~z2blVhdVH7q0Mp2Lz?~gjk zB?Pa7X4R|LZ=xBbHaxha{Jm;&^G9$q%3dZMj`yJ4ICkQ*aDTx^?v6P#HNYJV2reAhVW4Yxavn)L%MT2k6KZeA zxzn)(uE5ZO{)XaSSoev`9L5>;O@`xr05=>AyO#A!ncLy0jA)8<7LLjW55w^Hm#6L z=iWMbgmL1+lY(2+7?QQg5;9id4rrfb=WaDy);<8;=PFm!5Umu%)Ki%W8xI4@cT&W- z_ZA(tmPAhU!t;3-x(EzMD~JUQ$YWHF;sU$Zd!44lkbeiQgpYeve)d9YhKzaok9KHX z3bUc1u;dfOBRGhWp=o7WS+Nrmqk(8@enzL>RZ@Nm$dqu)qNcVQGy=gJ@^0=Efb=9x#w6g zbCqhUHkD|q9DQhTNFHrk&aYfm}w^Ku=HEA6*oaIOhXRad0D z=zpXBvewm$#vP%?G+~^nI3X;V45&Z3WFgWJ;Gjt1|fMYIgM|9 zjlN!=q$_N|W}G(d%=(1!YX3id?XKjsn53X)Q{S6p(FTmoxYd~#hV{Q;$kO6=r{i1# zyJU6K#pP8vg2Z?myOSTwCjC#W-%H;o?D=a@){m@s5w;jx*njzP>}W}@@TFF4@CV*M zgC@c7X+$aiMM$_4if6@$TYkq4e7*^6Hq3xq=n!03Fx^1s@M;~Bc9i!4SS!@p__@`Q z1g;>X1$~9$Q5gHoWe$FdzHxWFd$8TX&~j^cVUXaax{ZTK!?15Dp8zZk9w_>gc$Oqm49$`k1EfeNcEC2PQGc2(WUS- z)D@O|fVc%a2{H_=R4XG^LSh{mZXnuH5$CW=C5AI$@d)sryDT3I<6P_j@4icbt)w|v zF8pD20;iiiWCS^0DCT+#im)CchfsY9tKpPZe=&QkiXckRLtF;$fTCqgbT4-t1KC(5 zn(Az@y>*>11K1|Gv6MVUw)vDY>uZwuDC#jc!C zV$Kw ”Width”: inWidthPXInt, # Width of the remote desktop in pixels, example 1680 + > “Height”: inHeightPXInt, # Height of the remote desktop in pixels, example 1050 + > # “640x480” or “1680x1050” or “FullScreen”. If Resolution not exists set full screen, example + > “FlagUseAllMonitors”: inUseBothMonitorBool, # True or False, example False + > “DepthBit”: str(inDepthBitInt) # “32” or “24” or “16” or “15”, example “32” + + }, + “SharedDriveList”: inSharedDriveList, # List of the Root sesion hard drives, example [“c”] + ###### Will updated in program ############ + “SessionHex”: “77777sdfsdf77777dsfdfsf77777777”, # Hex is created when robot runs, example “” + “SessionIsWindowExistBool”: False, + # Flag if the RDP window is exist, old name “FlagSessionIsActive”. Check every n seconds , example False + “SessionIsWindowResponsibleBool”: False, + # Flag if RDP window is responsible (recieve commands). Check every nn seconds. If window is Responsible - window is Exist too , example False + “SessionIsIgnoredBool”: False # Flag to ignore RDP window False - dont ignore, True - ignore, example False + + } + + ### pyOpenRPA.Orchestrator.__Orchestrator__.SchedulerActivityTimeAddWeekly(inGSettings, inTimeHHMMStr='23:55:', inWeekdayList=None, inActivityList=None) -Add activity in time weekly +Add activity item list in scheduler. You can set weekday list and set time when launch. Activity list will be executed at planned time/day. + +``` +# USAGE +from pyOpenRPA import Orchestrator + +# EXAMPLE 1 +def TestDef(inArg1Str): + pass +lActivityItem = Orchestrator.ProcessorActivityItemCreate( + inDef = TestDef, + inArgList=[], + inArgDict={"inArg1Str": "ArgValueStr"}, + inArgGSettingsStr = None, + inArgLoggerStr = None) +Orchestrator.SchedulerActivityTimeAddWeekly( + inGSettings = gSettingsDict, + inTimeHHMMStr = "04:34", + inWeekdayList=[2,3,4], + inActivityList = [lActivityItem]) +# Activity will be executed at 04:34 Wednesday (2), thursday (3), friday (4) +``` * **Parameters** @@ -1324,19 +1409,20 @@ Add activity in time weekly * **inGSettings** – Global settings dict (singleton) - * **inTimeHHMMStr** – + * **inTimeHHMMStr** – Activation time from “00:00” to “23:59”. Example: “05:29” - * **inWeekdayList** – + * **inWeekdayList** – Week day list to initiate activity list. Use int from 0 (monday) to 6 (sunday) as list items. Example: [0,1,2,3,4]. Default value is everyday ([0,1,2,3,4,5,6]) - * **inActivityList** – + * **inActivityList** – Activity list structure * **Returns** - + None + ### pyOpenRPA.Orchestrator.__Orchestrator__.UACKeyListCheck(inRequest, inRoleKeyList) diff --git a/Wiki/ENG_Guide/markdown/Robot/01_Robot.md b/Wiki/ENG_Guide/markdown/Robot/01_Robot.md index ea9afd6c..94fdb182 100644 --- a/Wiki/ENG_Guide/markdown/Robot/01_Robot.md +++ b/Wiki/ENG_Guide/markdown/Robot/01_Robot.md @@ -5,6 +5,160 @@ pyOpenRPA Robot is the python package. ## pyOpenRPA Robot +### pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt() +Detect OS bitness. + + +* **Returns** + + int 32 or int 64 + + + +### pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication(inControlSpecificationArray) +#Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element + + +* **Parameters** + + **inControlSpecificationArray** – List of dict, dict in pywinauto.find_windows notation + + + +* **Returns** + + process application object + + + +### pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO(inControlSpecificationArray) +#Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element +#old name - GetControl + + +* **Parameters** + + **inControlSpecificationArray** – List of dict, dict in pywinauto.find_windows notation + + + +* **Returns** + + list of UIO object + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool(inSpecificationList, inWaitSecs) +Wait for UI object will appear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationList** – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}] + + + * **inWaitSecs** – Float value (seconds) for wait UI element appear in GUI + + + +* **Returns** + + True - UI object will appear. False - else case + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool(inSpecificationList, inWaitSecs) +Wait for UI object will disappear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationList** – UIOSelector. + Example: [{“title”:”notepad”},{“title”:”OK”}] + + + * **inWaitSecs** – Float value (seconds) for wait UI element disappear in GUI + + + +* **Returns** + + True - UI object will disappear. False - else case + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector) +Check if object is exist by the UIO selector. + + +* **Parameters** + + **inUIOSelector** – + + + +* **Returns** + + True - Object is exist. False - else case + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList) +Detect process bitness by the UI Object UIO Selector. + + +* **Parameters** + + **inSpecificationList** – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}] + + + +* **Returns** + + int 32 or int 64 + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr(inSpecificationList) +Detect process bitness by the UI Object UIO Selector. + + +* **Parameters** + + **inSpecificationList** – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}] + + + +* **Returns** + + str “32” or str “64” + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO(inSpecificationList, inElement=None, inFlagRaiseException=True) +Get the pywinauto object by the UIO selector. + + +* **Parameters** + + + * **inSpecificationList** – + + + * **inElement** – + + + * **inFlagRaiseException** – + + + +* **Returns** + + + + ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True) Get the UIO list by the selector @@ -23,3 +177,118 @@ Get the UIO list by the selector * **Returns** + + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector) +Safe get other process or None if destination app is the other/same bitness + + +* **Parameters** + + **inUIOSelector** – UIO Selector of the UI object + + + +* **Returns** + + None or process (of the other bitness) + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO(inElementSpecification) +UIOSelector (see description on the top of the document) +#old name - AutomationSearchMouseElement + + +* **Parameters** + + **inElementSpecification** – UIOSelector of the UI Object + + + +* **Returns** + + pywinauto element wrapper instance or None + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector) +!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! + + +* **Parameters** + + **inUIOSelector** – UIOSelector of the UI Object + + + +* **Returns** + + ? + + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False) +Wait for many UI object will appear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationListList** – UIOSelector list. + Example: [ + + > [{“title”:”notepad”},{“title”:”OK”}], + > [{“title”:”notepad”},{“title”:”Cancel”}] + + ] + + + + * **inWaitSecs** – Float value (seconds) for wait UI element appear in GUI + + + * **inFlagWaitAllInMoment** – True - Wait all UI objects from the UIOSelector list to be appeared + + + +* **Returns** + + List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}] + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False) +Wait for many UI object will disappear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationListList** – UIOSelector list. + Example: [ + + > [{“title”:”notepad”},{“title”:”OK”}], + > [{“title”:”notepad”},{“title”:”Cancel”}] + + ] + + + + * **inWaitSecs** – Float value (seconds) for wait UI element disappear in GUI + + + * **inFlagWaitAllInMoment** – True - Wait all UI objects from the UIOSelector list to be disappeared. + + + +* **Returns** + + List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}] + + + +* **Returns** diff --git a/Wiki/ENG_Guide/markdown/Robot/02_Defs.md b/Wiki/ENG_Guide/markdown/Robot/02_Defs.md index d88ef090..1fc659dc 100644 --- a/Wiki/ENG_Guide/markdown/Robot/02_Defs.md +++ b/Wiki/ENG_Guide/markdown/Robot/02_Defs.md @@ -15,11 +15,235 @@ UIDesktop.UIOSelector_Get_UIO( **Functions:** -| `UIOSelector_Get_UIOList`(inSpecificationList) +| `Get_OSBitnessInt`() - | Get the UIO list by the selector + | Detect OS bitness. | +| `PWASpecification_Get_PWAApplication`(…) + + | #Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element + + | +| `PWASpecification_Get_UIO`(…) + + | #Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element #old name - GetControl + + | +| `UIOSelectorSecs_WaitAppear_Bool`(…) + + | Wait for UI object will appear in GUI for inWaitSecs seconds. + + | +| `UIOSelectorSecs_WaitDisappear_Bool`(…) + + | Wait for UI object will disappear in GUI for inWaitSecs seconds. + + | +| `UIOSelector_Exist_Bool`(inUIOSelector) + + | Check if object is exist by the UIO selector. + + | +| `UIOSelector_Get_BitnessInt`(inSpecificationList) + + | Detect process bitness by the UI Object UIO Selector. + + | +| `UIOSelector_Get_BitnessStr`(inSpecificationList) + + | Detect process bitness by the UI Object UIO Selector. + + | +| `UIOSelector_Get_UIO`(inSpecificationList[, …]) + + | Get the pywinauto object by the UIO selector. + + | +| `UIOSelector_Get_UIOList`(inSpecificationList) + + | Get the UIO list by the selector + + | +| `UIOSelector_SafeOtherGet_Process`(inUIOSelector) + + | Safe get other process or None if destination app is the other/same bitness + + | +| `UIOSelector_SearchChildByMouse_UIO`(…) + + | UIOSelector (see description on the top of the document) #old name - AutomationSearchMouseElement + + | +| `UIOSelector_SearchChildByMouse_UIOTree`(…) + + | !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! + + | +| `UIOSelectorsSecs_WaitAppear_List`(…[, …]) + + | Wait for many UI object will appear in GUI for inWaitSecs seconds. + + | +| `UIOSelectorsSecs_WaitDisappear_List`(…[, …]) + + | Wait for many UI object will disappear in GUI for inWaitSecs seconds. + + | + +### pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt() +Detect OS bitness. + + +* **Returns** + + int 32 or int 64 + + + +### pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication(inControlSpecificationArray) +#Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element + + +* **Parameters** + + **inControlSpecificationArray** – List of dict, dict in pywinauto.find_windows notation + + + +* **Returns** + + process application object + + + +### pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO(inControlSpecificationArray) +#Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element +#old name - GetControl + + +* **Parameters** + + **inControlSpecificationArray** – List of dict, dict in pywinauto.find_windows notation + + + +* **Returns** + + list of UIO object + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool(inSpecificationList, inWaitSecs) +Wait for UI object will appear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationList** – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}] + + + * **inWaitSecs** – Float value (seconds) for wait UI element appear in GUI + + + +* **Returns** + + True - UI object will appear. False - else case + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool(inSpecificationList, inWaitSecs) +Wait for UI object will disappear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationList** – UIOSelector. + Example: [{“title”:”notepad”},{“title”:”OK”}] + + + * **inWaitSecs** – Float value (seconds) for wait UI element disappear in GUI + + + +* **Returns** + + True - UI object will disappear. False - else case + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector) +Check if object is exist by the UIO selector. + + +* **Parameters** + + **inUIOSelector** – + + + +* **Returns** + + True - Object is exist. False - else case + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList) +Detect process bitness by the UI Object UIO Selector. + + +* **Parameters** + + **inSpecificationList** – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}] + + + +* **Returns** + + int 32 or int 64 + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr(inSpecificationList) +Detect process bitness by the UI Object UIO Selector. + + +* **Parameters** + + **inSpecificationList** – UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}] + + + +* **Returns** + + str “32” or str “64” + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO(inSpecificationList, inElement=None, inFlagRaiseException=True) +Get the pywinauto object by the UIO selector. + + +* **Parameters** + + + * **inSpecificationList** – + + + * **inElement** – + + + * **inFlagRaiseException** – + + + +* **Returns** + + + ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True) Get the UIO list by the selector @@ -42,6 +266,121 @@ Get the UIO list by the selector + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector) +Safe get other process or None if destination app is the other/same bitness + + +* **Parameters** + + **inUIOSelector** – UIO Selector of the UI object + + + +* **Returns** + + None or process (of the other bitness) + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO(inElementSpecification) +UIOSelector (see description on the top of the document) +#old name - AutomationSearchMouseElement + + +* **Parameters** + + **inElementSpecification** – UIOSelector of the UI Object + + + +* **Returns** + + pywinauto element wrapper instance or None + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector) +!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! + + +* **Parameters** + + **inUIOSelector** – UIOSelector of the UI Object + + + +* **Returns** + + ? + + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False) +Wait for many UI object will appear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationListList** – UIOSelector list. + Example: [ + + > [{“title”:”notepad”},{“title”:”OK”}], + > [{“title”:”notepad”},{“title”:”Cancel”}] + + ] + + + + * **inWaitSecs** – Float value (seconds) for wait UI element appear in GUI + + + * **inFlagWaitAllInMoment** – True - Wait all UI objects from the UIOSelector list to be appeared + + + +* **Returns** + + List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}] + + + +### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False) +Wait for many UI object will disappear in GUI for inWaitSecs seconds. + + +* **Parameters** + + + * **inSpecificationListList** – UIOSelector list. + Example: [ + + > [{“title”:”notepad”},{“title”:”OK”}], + > [{“title”:”notepad”},{“title”:”Cancel”}] + + ] + + + + * **inWaitSecs** – Float value (seconds) for wait UI element disappear in GUI + + + * **inFlagWaitAllInMoment** – True - Wait all UI objects from the UIOSelector list to be disappeared. + + + +* **Returns** + + List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}] + + + +* **Returns** + + + ## References [reStructuredText](http://docutils.sourceforge.net/rst.html)