# Update Wiki + main readme (translate page Theory&Practice Desktop app)

dev-linux
Ivan Maslov 5 years ago
parent 7df0f46c16
commit caa3769160

@ -1,12 +1,24 @@
# pyOpenRPA
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]
- Create page Theory & practice: Keyboard & mouse manipulation [plan 31.08.2020]
- RUS - next step
- Tutorial
- ENG - next step
- RUS - in progress (see content below), plan date 18.09.2020
- Dev actions
- Refactoring the arguments in UIDesktop.py (only in new branch pyOpenRPA version. For backward compatibility purpose), plan date -
## Wiki
In wiki you can find:
- [About OpenRPA, library dependencies and licensing](Wiki/01.-About-OpenRPA,-library-dependencies-and-licensing.md)
- [About pyOpenRPA, library dependencies and licensing](Wiki/01.-About-OpenRPA,-library-dependencies-and-licensing.md)
- [Architecture (Studio, Robot, Orchestrator)](Wiki/02.-Architecture-(Studio,-Robot,-Orchestrator).md)
- [How to install (system requirements)](Wiki/03.-How-to-install-(system-requirements).md)
- [Tool Studio: How to use](Wiki/04.1.-Tool-Studio.-How-to-use.md)
@ -39,4 +51,7 @@ LinkedIn: https://www.linkedin.com/in/RU-IvanMaslov/
* pywinauto (Windows GUI automation)
* Semantic UI CSS framework
* JsRender by https://www.jsviews.com (switch to Handlebars)
* Handlebars
* Handlebars
#License
Under the MIT license (absolutely free)

@ -1,4 +1,4 @@
Here you can find the docs and examples of the OpenRPA desktop app access.
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
# Definitions
@ -11,26 +11,46 @@ Here you can find the docs and examples of the OpenRPA desktop app access.
**UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module<br>
**UIOEI** - UI Object info object
# UIOSelector structure & examples
**Desciption**<br>
[<br>
&nbsp; &nbsp; {<br>
&nbsp; &nbsp; &nbsp; &nbsp; "index" - index of the UI element in parent child list,<br>
&nbsp; &nbsp; &nbsp; &nbsp; "depth_start" - глубина, с которой начинается поиск (по умолчанию 1),<br>
&nbsp; &nbsp; &nbsp; &nbsp; "depth_end" - глубина, до которой ведется поиск (по умолчанию 1),<br>
&nbsp; &nbsp; &nbsp; &nbsp; "class_name" - наименование класса, который требуется искать,<br>
&nbsp; &nbsp; &nbsp; &nbsp; "title" - наименование заголовка,<br>
&nbsp; &nbsp; &nbsp; &nbsp; "rich_text" - наименование rich_text,<br>
&nbsp; &nbsp; &nbsp; &nbsp; "backend": <"win32"||"uia", only for the 1-st list element> - if not specified, use mDefaultPywinautoBackend<br>
&nbsp; &nbsp; &nbsp; &nbsp; "is_enabled": <bool> - признак, что элемент доступен для выполнения действий,<br>
&nbsp; &nbsp; &nbsp; &nbsp; "is_visible": <bool> - признак, что элемент отображается на экране,<br>
&nbsp; &nbsp; },<br>
&nbsp; &nbsp; { ... }<br>
]<br>
**Example**
> [{"title":"Настройка периода","class_name":"V8NewLocalFrameBaseWnd","backend":"uia"},{"ctrl_index":0},{"ctrl_index":0},{"ctrl_index":5}]
# What is UIO?
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
<a name="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.
},
{ ... specification next level UIO }
]
```
**The UIO selector example**
```
[
{"class_name":"CalcFrame", "backend":"win32"}, # 1-st level UIO specification
{"title":"Hex", "depth_start":3, "depth_end": 3} # 3-rd level specification (because of attribute depth_start|depth_stop)
]
```
# 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
- [UIOSelector_FocusHighlight](#UIOSelector_FocusHighlight)
- [UIOSelector_Highlight](#UIOSelector_Highlight)
### Description
**`UIOSelector_Get_UIOList (inSpecificationList,inElement=None,inFlagRaiseException=True)`**<br>
**`UIOSelector_Get_UIOList (inUIOSelector,inParentUIO=None,inFlagRaiseException=True)`**<br>
<a name="UIOSelector_Get_UIOList"></a>
___
Get list of the UIO<br>
Get the list of the UIO items<br>
___
**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>
___
**`UIOSelector_Get_UIO (inSpecificationList,inElement=None,inFlagRaiseException=True)`**<br>
**`UIOSelector_Get_UIO (inUIOSelector,inParentUIO=None,inFlagRaiseException=True)`**<br>
<a name="UIOSelector_Get_UIO"></a>
___
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>
___
**`UIOSelector_Exist_Bool (inSpecificationList)`**<br>
**`UIOSelector_Exist_Bool (inUIOSelector)`**<br>
<a name="UIOSelector_Exist_Bool"></a>
___
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>
___
**`UIOSelectorsSecs_WaitAppear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False)`**<br>
**`UIOSelectorsSecs_WaitAppear_List (inUIOSelectorList,inWaitSecs,inFlagWaitAllInMoment=False)`**<br>
<a name="UIOSelectorsSecs_WaitAppear_List"></a>
___
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>
___
**`UIOSelectorsSecs_WaitDisappear_List (inSpecificationListList,inWaitSecs,inFlagWaitAllInMoment=False)`**<br>
**`UIOSelectorsSecs_WaitDisappear_List (inUIOSelectorList,inWaitSecs,inFlagWaitAllInMoment=False)`**<br>
<a name="UIOSelectorsSecs_WaitDisappear_List"></a>
___
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>
___
**`UIOSelectorSecs_WaitAppear_Bool (inSpecificationList,inWaitSecs)`**<br>
**`UIOSelectorSecs_WaitAppear_Bool (inUIOSelector,inWaitSecs)`**<br>
<a name="UIOSelectorSecs_WaitAppear_Bool"></a>
___
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>
___
**`UIOSelectorSecs_WaitDisappear_Bool (inSpecificationList,inWaitSecs)`**<br>
**`UIOSelectorSecs_WaitDisappear_Bool (inUIOSelector,inWaitSecs)`**<br>
<a name="UIOSelectorSecs_WaitDisappear_Bool"></a>
___
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>
___
**`UIOSelector_Get_BitnessInt (inSpecificationList)`**<br>
**`UIOSelector_Get_BitnessInt (inUIOSelector)`**<br>
<a name="UIOSelector_Get_BitnessInt"></a>
___
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>
___
**`UIOSelector_SearchChildByMouse_UIO(inElementSpecification)`**<br>
**`UIOSelector_SearchChildByMouse_UIO(inUIOSelector)`**<br>
<a name="UIOSelector_SearchChildByMouse_UIO"></a>
___
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>
___
**`UIOSelector_SearchChildByMouse_UIOTree(inElementSpecification)`**<br>
**`UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector)`**<br>
<a name="UIOSelector_SearchChildByMouse_UIOTree"></a>
___
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>
___
**`UIOSelector_Get_UIOInfoList (inSpecificationList,inElement=None)`**<br>
**`UIOSelector_Get_UIOInfoList (inUIOSelector,inElement=None)`**<br>
<a name="UIOSelector_Get_UIOInfoList"></a>
___
Получить список информационных объектов, который удовлетворяет условиям <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>
___
**`UIOSelector_IsExist_Bool (inSpecificationList)`**<br>
**`UIOSelector_IsExist_Bool (inUIOSelector)`**<br>
<a name="UIOSelector_IsExist_Bool"></a>
___
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>
___
**`UIOSelector_WaitAppear_Dict(inSpecificationList,inTimeout=60)`**<br>
**`UIOSelector_WaitAppear_Dict(inUIOSelector,inTimeout=60)`**<br>
<a name="UIOSelector_WaitAppear_Dict"></a>
___
Wait for the UIO by the UIOSelector appear <br>
___
**inSpecificationList** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_TryRestore_Dict(inSpecificationList)`**<br>
**`UIOSelector_TryRestore_Dict(inUIOSelector)`**<br>
<a name="UIOSelector_TryRestore_Dict"></a>
___
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>
___
**`UIOSelector_Get_UIOActivityList (inControlSpecificationArray)`**<br>
**`UIOSelector_Get_UIOActivityList (inUIOSelector)`**<br>
<a name="UIOSelector_Get_UIOActivityList"></a>
___
Get the list of the UI object activities<br>
___
**inControlSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelectorUIOActivity_Run_Dict(inControlSpecificationArray,inActionName,inArgumentList=\[\],inkwArgumentObject={})`**<br>
**`UIOSelectorUIOActivity_Run_Dict(inUIOSelector,inActionName,inArgumentList=\[\],inkwArgumentObject={})`**<br>
<a name="UIOSelectorUIOActivity_Run_Dict"></a>
___
Run the activity in UIO (UI Object) <br>
___
**inControlSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
**inActionName** - UIOActivity (name) from Pywinauto<br>
___
**`UIOSelector_Get_UIOInfo(inControlSpecificationArray)`**<br>
**`UIOSelector_Get_UIOInfo(inUIOSelector)`**<br>
<a name="UIOSelector_Get_UIOInfo"></a>
___
Get the UIO dict of the attributes <br>
___
**inControlSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_GetChildList_UIOList(inControlSpecificationArray=\[\],inBackend=mDefaultPywinautoBackend)`**<br>
**`UIOSelector_GetChildList_UIOList(inUIOSelector=\[\],inBackend=mDefaultPywinautoBackend)`**<br>
<a name="UIOSelector_GetChildList_UIOList"></a>
___
Get list of child UIO's by Parent UIOSelector<br>
___
**inControlSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_SearchUIONormalize_UIOSelector (inControlSpecificationArray)`**<br>
**`UIOSelector_SearchUIONormalize_UIOSelector (inUIOSelector)`**<br>
<a name="UIOSelector_SearchUIONormalize_UIOSelector"></a>
___
Подготовить массив для обращения к поиску элементов <br>
Technical def. Do UIOSelector normalization for the search processes.<br>
___
**inControlSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_SearchProcessNormalize_UIOSelector (inControlSpecificationArray)`**<br>
**`UIOSelector_SearchProcessNormalize_UIOSelector (inUIOSelector)`**<br>
<a name="UIOSelector_SearchProcessNormalize_UIOSelector"></a>
___
Подготовить массив для обращения к поиску процесса (отличается от поиска элемента, т.к. данная функция нужна для нормализации спецификации для подключения к процессу с окнами)<br>
Technical def. Do UIOSelector normalization for the search processes.<br>
___
**inControlSpecificationArray** - UIOSelector <br>
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_FocusHighlight(inSpecificationArray)`**<br>
**`UIOSelector_FocusHighlight(inUIOSelector)`**<br>
<a name="UIOSelector_FocusHighlight"></a>
___
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>
___
**`UIOSelector_Highlight(inSpecificationArray)`**<br>
**`UIOSelector_Highlight(inUIOSelector)`**<br>
<a name="UIOSelector_Highlight"></a>
___
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>
___
Loading…
Cancel
Save