Powerfull OpenSource RPA tool for business (based on python 3). Best perfomance and absolutely free!
# Donate
## Donate
pyOpenRPA is absolutely non-commercial project. [Please donate some money if this project is important for you. Link to online donations.](https://money.yandex.ru/to/4100115560661986)
## Road map
- Wiki
- ENG - in progress (see content below), plan date 31.08.2020
- Translate page Theory & practice: Desktop app in english [done 19.08.2020]
UIO is a User Interface Object (pyOpenRPA terminology). For maximum compatibility, this instance is inherited from the object model developed in the [pywinauto library (click to get a list of available class functions)](https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html).
This approach allows us to implement useful functionality that has already been successfully developed in other libraries, and Supplement it with the missing functionality. In our case, the missing functionality is the ability to dynamically access UIO objects using UIO selectors.
# UIOSelector structure & example
<aname="UIOSelector_Structure_Examples"></a>
UIOSelector is the list of condition items for the UIO in GUI. Each item has condition attributes for detect applicable UIO. Here is the description of the available condition attributes in item.
**Desciption**<br>
```
[
{
"depth_start" :: [int, start from 1] :: the depth index, where to start check the condition list (default 1),
"depth_end" :: [int, start from 1] :: the depth index, where to stop check the condition list (default 1),
"ctrl_index" || "index" :: [int, starts from 0] :: the index of the UIO in parent UIO child list,
"title" :: [str] :: the condition for the UIO attribute *title*,
"title_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *title*,
"rich_text" :: [str] :: the condition for the UIO attribute *rich_text*,
"rich_text_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *rich_text*,
"class_name" :: [str] :: the condition for the UIO attribute *class_name*,
"class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *class_name*,
"friendly_class_name" :: [str] :: the condition for the UIO attribute *friendly_class_name*,
"friendly_class_name_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *friendly_class_name*,
"control_type" :: [str] :: the condition for the UIO attribute *control_type*,
"control_type_re" :: [str] :: regular expression (python ver) for the condition for the UIO attribute *control_type*,
"is_enabled" :: [bool] :: the condition for the UIO attribute *is_enabled*. If UI object is enabled on GUI,
"is_visible" :: [bool] :: the condition for the UIO attribute *is_visible*. If UI object is visible on GUI,
"backend" :: [str, "win32" || "uia"] :: the method of UIO extraction (default "win32"). ATTENTION! Current option can be only for the first item of the UIO selector. For the next items this option will be implemented from the first item.
# The UIDesktop module (OpenRPA/Robot/UIDesktop.py)
The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the **win32** and **ui automation** dll frameworks (big thx to the Microsoft :) ).
@ -60,191 +80,191 @@ The UIDesktop is extension of the pywinauto module which provide access to the d
**inSpecificationList** - UIOSelector - List of dict (key attributes)<br>
**inElement** - UIO pywinauto Входной элемент - показатель, что не требуется выполнять коннект к процессу<br>
**inFlagRaiseException** - Флаг True - выкинуть ошибку в случае обнаружении пустого списка<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inParentUIO** - Technical argument. Applicable only if you has UIO object, which is parent for the futher search the child UIO.<br>
**inFlagRaiseException** - if True - raise exception if UIO hasn't been detected. False - don't raise the exception - return None.<br>
Get first (if more than one UIO are applied) UIO (UI Object) <br>
___
**inSpecificationList** - UIOSelector <br>
**inElement** - Входной элемент - показатель, что не требуется выполнять коннект к процессу <br>
**inFlagRaiseException** - Флаг True - выкинуть ошибку в случае обнаружении пустого списка <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inParentUIO** - Technical argument. Applicable only if you has UIO object, which is parent for the futher search the child UIO.<br>
**inFlagRaiseException** - if True - raise exception if UIO hasn't been detected. False - don't raise the exception - return None.<br>
Check if UIO exist (Identified by the UIOSelector) <br>
___
**inSpecificationList** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Wait for UIO is appear (at least one of them or all at the same time). return: \[0,1,2\] - index of UIOSpecification, which is appear <br>
___
**inSpecificationListList** - !List! of the UIOSelector <br>
**inWaitSecs** - Время ожидания объекта в секундах <br>
**inFlagWaitAllInMoment** - доп. условие - ожидать появление всех UIOSelector одновременно <br>
**inUIOSelectorList** - !ATTENTION! Current argument is not the UIOSelector. This is the !list! of the many UIO selectors. ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inWaitSecs** - Time in seconds to wait the UIO will appear.<br>
**inFlagWaitAllInMoment** - True - wait when UIO of the all UIOSelectors will appear. False - at least one UIO of the UIOSelector list.<br>
Wait for UIO is Disappear (at least one of them or all at the same time). return: \[0,1,2\] - index of UIOSpecification, which is Disappear <br>
___
**inSpecificationListList** - !List! of the UIOSelector <br>
**inWaitSecs** - Время ожидания пропажи объекта в секундах <br>
**inFlagWaitAllInMoment** - доп. условие - ожидать пропажу всех UIOSelector одновременно <br>
**inUIOSelectorList** - !ATTENTION! Current argument is not the UIOSelector. This is the !list! of the many UIO selectors. ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inWaitSecs** - Time in seconds to wait the UIO will appear.<br>
**inFlagWaitAllInMoment** - True - wait when UIO of the all UIOSelectors will appear. False - at least one UIO of the UIOSelector list.<br>
Wait for UIO is appear (at least one of them or all at the same time). return: Bool - True - UIO is appear. <br>
___
**inSpecificationList** - UIOSelector <br>
**inWaitSecs** - Время ожидания объекта в секундах <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inWaitSecs** - Time in seconds to wait the UIO will appear.<br>
Wait for UIO is disappear (at least one of them or all at the same time) . return: Bool - True - UIO is Disappear. <br>
___
**inSpecificationList** - UIOSelector<br>
**inWaitSecs** - Время ожидания пропажи объекта в секундах<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inWaitSecs** - Time in seconds to wait the UIO will appear.<br>
Get process bitness (32 or 64). return None (if Process not found), int 32, or int 64<br>
___
**inSpecificationList** - UIOSelector<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Run the search UIO by mouse hover event. result = pywinauto element wrapper instance or None <br>
Run the search UIO by mouse hover event. result = UIO element wrapper instance or None <br>
___
**inElementSpecification** - UIOSelector (see description on the top of the document) <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Run the search UIO by mouse hover event. result = pywinauto element wrapper instance or None <br>
Run the search UIO by mouse hover event. result = UIO element wrapper instance or None <br>
___
**inElementSpecification** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Получить список информационных объектов, который удовлетворяет условиям <br>
Get the UIOEI object.<br>
___
**inSpecificationList** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Check is the UIO/UIO's by the UIOSelector exist <br>
___
**inSpecificationList** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Try to restore (maximize) window, if it's was minimized. (особенность uia backend - он не может прицепиться к окну, если оно свернуто)<br>
Try to restore (maximize) window, if it's minimized. (!IMPORTANT! When use UIA framework minimized windows doesn't appear by the UIOSelector. You need to try restore windows and after that try to get UIO)<br>
___
**inSpecificationList** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inActionName** - UIOActivity (name) from Pywinauto<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Подготовить массив для обращения к поиску процесса (отличается от поиска элемента, т.к. данная функция нужна для нормализации спецификации для подключения к процессу с окнами)<br>
Technical def. Do UIOSelector normalization for the search processes.<br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Set focus and highlight (draw outline) the element (in app) by the UIO selector.<br>
___
**inSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
Highlight (draw outline) the element (in app) by the UIO selector.<br>
___
**inSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>