GUIDE ENG update

dev-linux
Ivan Maslov 4 years ago
parent be1d43b6b0
commit 654c9a0b94

@ -2,9 +2,69 @@
2. Defs 2. Defs
#################################### ####################################
************************************************** ****************************************************************************************************
pyOpenRPA.Robot.UIDesktop Desktop app UI access (win32 and UI automation dlls)
************************************************** ****************************************************************************************************
Definitions
############################################
- **UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]
- **UIOSelector** - List of dict (key attributes)
- **PWA** - PyWinAuto
- **PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)
- **UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)
- **UIOInfo** - Dict of UIO attributes
- **UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module
- **UIOEI** - UI Object info object
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 :) ).
.. code-block:: python .. code-block:: python

@ -2,21 +2,10 @@
3. How to use 3. How to use
#################################### ####################################
**************************************************
Content
**************************************************
- `About <#about>`__
- `How to use <#way-to-use>`__
- `Create python script <#create-python-script>`__
- `Execute python script <#execute-python-script>`__
**************************************************
About
**************************************************
The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA. The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA.
************************************************** **************************************************
Way to use How to execute RPA script
************************************************** **************************************************
You can use the robot by the several ways: You can use the robot by the several ways:
@ -39,9 +28,8 @@ In order to use robot just add Robot tool folder in work directory and add line
import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br> import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br>
import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br> import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
**************************************************
Execute python script Execute python script
************************************************** ############################################
The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways: The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (\OpenRPA\Resources\WPy32-3720\python-3.7.2) - Execute in python x32 (\OpenRPA\Resources\WPy32-3720\python-3.7.2)
@ -80,9 +68,9 @@ In order to simplify the execution process you can write several code lines in f
.\..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe orchestratorMain.py .\..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe orchestratorMain.py
pause >nul pause >nul
**************************************************
Use in studio script (n/a) Use in studio script (n/a)
************************************************** ############################################
.. code-block:: python .. code-block:: python
import sys import sys
@ -92,12 +80,129 @@ Use in studio script (n/a)
import subprocess import subprocess
import time import time
#Highlight the UI Object in Folder explorer<br> #Highlight the UI Object in Folder explorer
GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])<br> GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])
#Wait 2 seconds
time.sleep(3)
#Loop: get child element of UI List
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():
print(str(lItem))
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
****************************************************************************************************
Theory & practice. Desktop app UI access (win32 and UI automation dlls)
****************************************************************************************************
Definitions
############################################
**UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]<br>
**UIOSelector** - List of dict (key attributes)<br>
**PWA** - PyWinAuto<br>
**PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)<br>
**UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)<br>
**UIOInfo** - Dict of UIO attributes<br>
**UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module<br>
**UIOEI** - UI Object info object
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**
```
[
{
"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 :) ).
*Naming convention: \<InArgument\>\_\<ActivityName\>\_\<OutArgument - if exist>*<br>
****************************************************************************************************
Theory & practice. WEB app UI access (selenium)
****************************************************************************************************
About
###############################################
The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here (https://selenium-python.readthedocs.io/)
How to use
###############################################
To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.
.. code-block:: python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
****************************************************************************************************
Theory & practice. Keyboard & mouse manipulation
****************************************************************************************************
****************************************************************************************************
Theory & practice. Screen capture & image recognition
****************************************************************************************************
#Wait 2 seconds<br> How to automate image recognition on PC
time.sleep(3)<br> ###########################################
#Loop: get child element of UI List<br> Here you can find any ways you need to use in your business case:
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():<br> - Find the exact match on the screen with the other image
&nbsp; &nbsp; &nbsp; &nbsp; print(str(lItem)) - Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition

@ -782,6 +782,12 @@ def UIOSelector_Get_UIOInfoList (inUIOSelector, inElement=None):
#inSpecificationList - UIOSelector #inSpecificationList - UIOSelector
#old name - PywinautoExtTryToRestore #old name - PywinautoExtTryToRestore
def UIOSelector_TryRestore_Dict(inSpecificationList): def UIOSelector_TryRestore_Dict(inSpecificationList):
"""
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)
:param inSpecificationList: UIOSelector - List of items, which contains condition attributes
:return:
"""
lResult={} lResult={}
try: try:
#Подготовка взодного массива #Подготовка взодного массива
@ -800,6 +806,12 @@ def UIOSelector_TryRestore_Dict(inSpecificationList):
#inControlSpecificationArray - UIOSelector #inControlSpecificationArray - UIOSelector
#old name - ElementActionGetList #old name - ElementActionGetList
def UIOSelector_Get_UIOActivityList (inUIOSelector): def UIOSelector_Get_UIOActivityList (inUIOSelector):
"""
Get the list of the UI object activities
:param inUIOSelector: UIOSelector - List of items, which contains condition attributes
:return:
"""
#Check the bitness #Check the bitness
lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector)
if lSafeOtherProcess is None: if lSafeOtherProcess is None:
@ -838,6 +850,15 @@ def UIOSelector_Get_UIOActivityList (inUIOSelector):
#inActionName - UIOActivity (name) from Pywinauto #inActionName - UIOActivity (name) from Pywinauto
#old name - ElementRunAction #old name - ElementRunAction
def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=None, inkwArgumentObject=None): def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=None, inkwArgumentObject=None):
"""
Run the activity in UIO (UI Object)
:param inUIOSelector: UIOSelector - List of items, which contains condition attributes
:param inActionName: UIOActivity (name) activity name string from Pywinauto
:param inArgumentList:
:param inkwArgumentObject:
:return:
"""
if inArgumentList is None: inArgumentList=[] # 2021 02 22 Minor fix by Ivan Maslov 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 if inkwArgumentObject is None: inkwArgumentObject={} # 2021 02 22 Minor fix by Ivan Maslov
lResult={} lResult={}
@ -887,6 +908,12 @@ def UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=
#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
#old name - ElementGetInfo #old name - ElementGetInfo
def UIOSelector_Get_UIOInfo(inUIOSelector): def UIOSelector_Get_UIOInfo(inUIOSelector):
"""
Get the UIO dict of the attributes
:param inUIOSelector: UIOSelector - List of items, which contains condition attributes
:return:
"""
#Check the bitness #Check the bitness
lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector)
if lSafeOtherProcess is None: if lSafeOtherProcess is None:
@ -1012,6 +1039,15 @@ def UIOXY_SearchChild_ListDict(inRootElement,inX,inY,inHierarchyList=None):
#inControlSpecificationArray- UIOSelector #inControlSpecificationArray- UIOSelector
#old name - ElementGetChildElementList #old name - ElementGetChildElementList
def UIOSelector_GetChildList_UIOList(inUIOSelector=None, inBackend=mDefaultPywinautoBackend): def UIOSelector_GetChildList_UIOList(inUIOSelector=None, inBackend=mDefaultPywinautoBackend):
"""
Get list of child UIO's by the parent UIOSelector
:param inUIOSelector: UIOSelector - List of items, which contains condition attributes
:param inBackend: "win32" or "uia"
:return:
"""
if inUIOSelector is None: inUIOSelector = [] if inUIOSelector is None: inUIOSelector = []
#mRobotLogger.info(f"File!!!!") #mRobotLogger.info(f"File!!!!")
#mRobotLogger.info(f"inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}") #mRobotLogger.info(f"inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}")
@ -1301,6 +1337,12 @@ def BackendStr_GetTopLevelList_UIOInfo(inBackend=mDefaultPywinautoBackend):
#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
#old name - ElementDrawOutlineNew #old name - ElementDrawOutlineNew
def UIOSelector_Highlight(inUIOSelector): def UIOSelector_Highlight(inUIOSelector):
"""
Highlight (draw outline) the element (in app) by the UIO selector.
:param inUIOSelector: UIOSelector - List of items, which contains condition attributes
:return:
"""
#Check the bitness #Check the bitness
lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector)
if lSafeOtherProcess is None: if lSafeOtherProcess is None:
@ -1326,6 +1368,13 @@ def UIOSelector_Highlight(inUIOSelector):
#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! #!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
#old name - ElementDrawOutlineNewFocus #old name - ElementDrawOutlineNewFocus
def UIOSelector_FocusHighlight(inUIOSelector): def UIOSelector_FocusHighlight(inUIOSelector):
"""
Set focus and highlight (draw outline) the element (in app) by the UIO selector.
:param inUIOSelector: UIOSelector - List of items, which contains condition attributes
:return:
"""
#Check the bitness #Check the bitness
lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector) lSafeOtherProcess = UIOSelector_SafeOtherGet_Process(inUIOSelector)
if lSafeOtherProcess is None: if lSafeOtherProcess is None:

@ -1,22 +0,0 @@
# Content
- About
- How to use
# About
The OpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find [here](https://selenium-python.readthedocs.io/)
# How to use
To start use selenium just import selenium modules in [the robot tool](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/04.2.-Tool-Robot:-How-to-use). Here is the example of the usage.
> from selenium import webdriver <br>
> from selenium.webdriver.common.keys import Keys <br>
> <br>
> driver = webdriver.Chrome() <br>
> driver.get("http://www.python.org") <br>
> assert "Python" in driver.title <br>
> elem = driver.find_element_by_name("q") <br>
> elem.clear() <br>
> elem.send_keys("pycon") <br>
> elem.send_keys(Keys.RETURN) <br>
> assert "No results found." not in driver.page_source <br>
> driver.close() <br>

@ -1,270 +0,0 @@
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
# Definitions
**UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]<br>
**UIOSelector** - List of dict (key attributes)<br>
**PWA** - PyWinAuto<br>
**PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)<br>
**UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)<br>
**UIOInfo** - Dict of UIO attributes<br>
**UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module<br>
**UIOEI** - UI Object info object
# 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 :) ).
## Functions
*Naming convention: \<InArgument\>\_\<ActivityName\>\_\<OutArgument - if exist>*<br>
### List
- [UIOSelector_Get_UIOList](#UIOSelector_Get_UIOList)
- [UIOSelector_Get_UIO](#UIOSelector_Get_UIO)
- [UIOSelector_Exist_Bool](#UIOSelector_Exist_Bool)
- [UIOSelectorsSecs_WaitAppear_List](#UIOSelectorsSecs_WaitAppear_List)
- [UIOSelectorsSecs_WaitDisappear_List](#UIOSelectorsSecs_WaitDisappear_List)
- [UIOSelectorSecs_WaitAppear_Bool](#UIOSelectorSecs_WaitAppear_Bool)
- [UIOSelectorSecs_WaitDisappear_Bool](#UIOSelectorSecs_WaitDisappear_Bool)
- [UIOSelector_Get_BitnessInt](#UIOSelector_Get_BitnessInt)
- [UIOSelector_SearchChildByMouse_UIO](#UIOSelector_SearchChildByMouse_UIO)
- [UIOSelector_SearchChildByMouse_UIOTree](#UIOSelector_SearchChildByMouse_UIOTree)
- [UIOSelector_Get_UIOInfoList](#UIOSelector_Get_UIOInfoList)
- [UIOSelector_IsExist_Bool](#UIOSelector_IsExist_Bool)
- [UIOSelector_WaitAppear_Dict](#UIOSelector_WaitAppear_Dict)
- [UIOSelector_TryRestore_Dict](#UIOSelector_TryRestore_Dict)
- [UIOSelector_Get_UIOActivityList](#UIOSelector_Get_UIOActivityList)
- [UIOSelectorUIOActivity_Run_Dict](#UIOSelectorUIOActivity_Run_Dict)
- [UIOSelector_Get_UIOInfo](#UIOSelector_Get_UIOInfo)
- [UIOSelector_GetChildList_UIOList](#UIOSelector_GetChildList_UIOList)
- [UIOSelector_SearchUIONormalize_UIOSelector](#UIOSelector_SearchUIONormalize_UIOSelector)
- [UIOSelector_SearchProcessNormalize_UIOSelector](#UIOSelector_SearchProcessNormalize_UIOSelector)
- [UIOSelector_FocusHighlight](#UIOSelector_FocusHighlight)
- [UIOSelector_Highlight](#UIOSelector_Highlight)
### Description
**`UIOSelector_Get_UIOList (inUIOSelector,inParentUIO=None,inFlagRaiseException=True)`**<br>
<a name="UIOSelector_Get_UIOList"></a>
___
Get the list of the UIO items<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 (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>
___
**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 (inUIOSelector)`**<br>
<a name="UIOSelector_Exist_Bool"></a>
___
Check if UIO exist (Identified by the UIOSelector) <br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<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>
___
**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 (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>
___
**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 (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>
___
**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 (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>
___
**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 (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>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_SearchChildByMouse_UIO(inUIOSelector)`**<br>
<a name="UIOSelector_SearchChildByMouse_UIO"></a>
___
Run the search UIO by mouse hover event. result = UIO element wrapper instance or None <br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector)`**<br>
<a name="UIOSelector_SearchChildByMouse_UIOTree"></a>
___
Run the search UIO by mouse hover event. result = UIO element wrapper instance or None <br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_Get_UIOInfoList (inUIOSelector,inElement=None)`**<br>
<a name="UIOSelector_Get_UIOInfoList"></a>
___
Get the UIOEI object.<br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_IsExist_Bool (inUIOSelector)`**<br>
<a name="UIOSelector_IsExist_Bool"></a>
___
Check is the UIO/UIO's by the UIOSelector exist <br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_WaitAppear_Dict(inUIOSelector,inTimeout=60)`**<br>
<a name="UIOSelector_WaitAppear_Dict"></a>
___
Wait for the UIO by the UIOSelector appear <br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_TryRestore_Dict(inUIOSelector)`**<br>
<a name="UIOSelector_TryRestore_Dict"></a>
___
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>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_Get_UIOActivityList (inUIOSelector)`**<br>
<a name="UIOSelector_Get_UIOActivityList"></a>
___
Get the list of the UI object activities<br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelectorUIOActivity_Run_Dict(inUIOSelector,inActionName,inArgumentList=\[\],inkwArgumentObject={})`**<br>
<a name="UIOSelectorUIOActivity_Run_Dict"></a>
___
Run the activity in UIO (UI Object) <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(inUIOSelector)`**<br>
<a name="UIOSelector_Get_UIOInfo"></a>
___
Get the UIO dict of the attributes <br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_GetChildList_UIOList(inUIOSelector=\[\],inBackend=mDefaultPywinautoBackend)`**<br>
<a name="UIOSelector_GetChildList_UIOList"></a>
___
Get list of child UIO's by Parent UIOSelector<br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_SearchUIONormalize_UIOSelector (inUIOSelector)`**<br>
<a name="UIOSelector_SearchUIONormalize_UIOSelector"></a>
___
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>
___
**`UIOSelector_SearchProcessNormalize_UIOSelector (inUIOSelector)`**<br>
<a name="UIOSelector_SearchProcessNormalize_UIOSelector"></a>
___
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>
___
**`UIOSelector_FocusHighlight(inUIOSelector)`**<br>
<a name="UIOSelector_FocusHighlight"></a>
___
Set focus and highlight (draw outline) the element (in app) by the UIO selector.<br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___
**`UIOSelector_Highlight(inUIOSelector)`**<br>
<a name="UIOSelector_Highlight"></a>
___
Highlight (draw outline) the element (in app) by the UIO selector.<br>
___
**inUIOSelector** - UIOSelector - List of items, which contains condition attributes ([see UIOSelector Structure&Examples](#UIOSelector_Structure_Examples))<br>
___

@ -1 +0,0 @@
**How to automate Keyboard and Mouse device in PC**

@ -1,7 +0,0 @@
**How to automate image recognition on PC**
Here you can find any ways you need to use in your business case:
* Find the exact match on the screen with the other image
* Use text recognition module (OCR)
* Use computer vision (CV) to identify the objects on screen/image/video
* Use artificial intelligence (AI) to make custom identification/classification/text recognition

@ -193,8 +193,9 @@ If you need IT help feel free to contact me (prefer e-mail or skype).</p>
<ul class="simple"> <ul class="simple">
<li><p>E-mail: <a class="reference external" href="mailto:Ivan&#46;Maslov&#37;&#52;&#48;UnicodeLabs&#46;ru">Ivan<span>&#46;</span>Maslov<span>&#64;</span>UnicodeLabs<span>&#46;</span>ru</a></p></li> <li><p>E-mail: <a class="reference external" href="mailto:Ivan&#46;Maslov&#37;&#52;&#48;UnicodeLabs&#46;ru">Ivan<span>&#46;</span>Maslov<span>&#64;</span>UnicodeLabs<span>&#46;</span>ru</a></p></li>
<li><p>Skype: MegaFinder</p></li> <li><p>Skype: MegaFinder</p></li>
<li><p>Facebook: <a class="reference external" href="https://www.facebook.com/RU.Ivan.Maslov">https://www.facebook.com/RU.Ivan.Maslov</a></p></li> <li><p>Facebook: <a class="reference external" href="https://www.facebook.com/RU.IT4Business">https://www.facebook.com/RU.IT4Business</a></p></li>
<li><p>LinkedIn: <a class="reference external" href="https://www.linkedin.com/in/RU-IvanMaslov/">https://www.linkedin.com/in/RU-IvanMaslov/</a></p></li> <li><p>LinkedIn: <a class="reference external" href="https://www.linkedin.com/in/RU-IvanMaslov/">https://www.linkedin.com/in/RU-IvanMaslov/</a></p></li>
<li><p>WhatsApp | Telegram: +7 906 722 39 25</p></li>
</ul> </ul>
</div> </div>
<div class="section" id="rd-party-components-license-dependencies"> <div class="section" id="rd-party-components-license-dependencies">

@ -260,6 +260,25 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorUIOActivity_Run_Dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em>, <em class="sig-param"><span class="n">inActionName</span></em>, <em class="sig-param"><span class="n">inArgumentList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inkwArgumentObject</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorUIOActivity_Run_Dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict" title="Permalink to this definition"></a></dt>
<dd><p>Run the activity in UIO (UI Object)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p></li>
<li><p><strong>inActionName</strong> UIOActivity (name) activity name string from Pywinauto</p></li>
<li><p><strong>inArgumentList</strong> </p></li>
<li><p><strong>inkwArgumentObject</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Exist_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Exist_Bool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Exist_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Exist_Bool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="Permalink to this definition"></a></dt>
@ -274,6 +293,37 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_FocusHighlight</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_FocusHighlight"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight" title="Permalink to this definition"></a></dt>
<dd><p>Set focus and highlight (draw outline) the element (in app) by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_GetChildList_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inBackend</span><span class="o">=</span><span class="default_value">'win32'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_GetChildList_UIOList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList" title="Permalink to this definition"></a></dt>
<dd><p>Get list of child UIOs by the parent UIOSelector</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p></li>
<li><p><strong>inBackend</strong> “win32” or “uia”</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_BitnessInt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_BitnessInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_BitnessInt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_BitnessInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="Permalink to this definition"></a></dt>
@ -320,6 +370,34 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOActivityList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOActivityList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList" title="Permalink to this definition"></a></dt>
<dd><p>Get the list of the UI object activities</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo" title="Permalink to this definition"></a></dt>
<dd><p>Get the UIO dict of the attributes</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inElement</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inFlagRaiseException</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inElement</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inFlagRaiseException</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="Permalink to this definition"></a></dt>
@ -338,6 +416,20 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Highlight</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Highlight"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight" title="Permalink to this definition"></a></dt>
<dd><p>Highlight (draw outline) the element (in app) by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SafeOtherGet_Process</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SafeOtherGet_Process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SafeOtherGet_Process</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SafeOtherGet_Process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="Permalink to this definition"></a></dt>
@ -382,6 +474,20 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_TryRestore_Dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_TryRestore_Dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict" title="Permalink to this definition"></a></dt>
<dd><p>Try to restore (maximize) window, if its minimized. (!IMPORTANT! When use UIA framework minimized windows doesnt appear by the UIOSelector. You need to try restore windows and after that try to get UIO)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inSpecificationList</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorsSecs_WaitAppear_List</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationListList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em>, <em class="sig-param"><span class="n">inFlagWaitAllInMoment</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorsSecs_WaitAppear_List"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorsSecs_WaitAppear_List</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationListList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em>, <em class="sig-param"><span class="n">inFlagWaitAllInMoment</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorsSecs_WaitAppear_List"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="Permalink to this definition"></a></dt>

@ -96,7 +96,13 @@
<ul class="current"> <ul class="current">
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li> <li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">2. Defs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#pyopenrpa-robot-uidesktop">pyOpenRPA.Robot.UIDesktop</a></li> <li class="toctree-l2"><a class="reference internal" href="#desktop-app-ui-access-win32-and-ui-automation-dlls">Desktop app UI access (win32 and UI automation dlls)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#definitions">Definitions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#what-is-uio">What is UIO?</a></li>
<li class="toctree-l3"><a class="reference internal" href="#uioselector-structure-example">UIOSelector structure &amp; example</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-uidesktop-module-openrpa-robot-uidesktop-py">The UIDesktop module (OpenRPA/Robot/UIDesktop.py)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#references">References</a></li> <li class="toctree-l2"><a class="reference internal" href="#references">References</a></li>
</ul> </ul>
</li> </li>
@ -183,8 +189,77 @@
<div class="section" id="defs"> <div class="section" id="defs">
<h1>2. Defs<a class="headerlink" href="#defs" title="Permalink to this headline"></a></h1> <h1>2. Defs<a class="headerlink" href="#defs" title="Permalink to this headline"></a></h1>
<div class="section" id="pyopenrpa-robot-uidesktop"> <div class="section" id="desktop-app-ui-access-win32-and-ui-automation-dlls">
<h2>pyOpenRPA.Robot.UIDesktop<a class="headerlink" href="#pyopenrpa-robot-uidesktop" title="Permalink to this headline"></a></h2> <h2>Desktop app UI access (win32 and UI automation dlls)<a class="headerlink" href="#desktop-app-ui-access-win32-and-ui-automation-dlls" title="Permalink to this headline"></a></h2>
<div class="section" id="definitions">
<h3>Definitions<a class="headerlink" href="#definitions" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p><strong>UIO</strong> - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]</p></li>
<li><p><strong>UIOSelector</strong> - List of dict (key attributes)</p></li>
<li><p><strong>PWA</strong> - PyWinAuto</p></li>
<li><p><strong>PWASpecification</strong> - List of dict (key attributes in pywinauto.find_window notation)</p></li>
<li><p><strong>UIOTree</strong> - Recursive Dict of Dict … (UI Parent -&gt; Child hierarchy)</p></li>
<li><p><strong>UIOInfo</strong> - Dict of UIO attributes</p></li>
<li><p><strong>UIOActivity</strong> - Activity of the UIO (UI object) from the Pywinauto module</p></li>
<li><p><strong>UIOEI</strong> - UI Object info object</p></li>
</ul>
</div>
<div class="section" id="what-is-uio">
<h3>What is UIO?<a class="headerlink" href="#what-is-uio" title="Permalink to this headline"></a></h3>
<p>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)](<a class="reference external" href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html">https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html</a>).</p>
<p>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.</p>
</div>
<div class="section" id="uioselector-structure-example">
<h3>UIOSelector structure &amp; example<a class="headerlink" href="#uioselector-structure-example" title="Permalink to this headline"></a></h3>
<p>&lt;a name=”UIOSelector_Structure_Examples”&gt;&lt;/a&gt;
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.</p>
<dl class="simple">
<dt><a href="#id1"><span class="problematic" id="id2">**</span></a>Desciption**&lt;br&gt;</dt><dd><p><a href="#id3"><span class="problematic" id="id4">``</span></a><a href="#id5"><span class="problematic" id="id6">`</span></a></p>
</dd>
</dl>
<dl>
<dt>[</dt><dd><dl class="simple">
<dt>{</dt><dd><p>“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 <em>title</em>,
“title_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>title</em>,
“rich_text” :: [str] :: the condition for the UIO attribute <em>rich_text</em>,
“rich_text_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>rich_text</em>,
“class_name” :: [str] :: the condition for the UIO attribute <em>class_name</em>,
“class_name_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>class_name</em>,
“friendly_class_name” :: [str] :: the condition for the UIO attribute <em>friendly_class_name</em>,
“friendly_class_name_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>friendly_class_name</em>,
“control_type” :: [str] :: the condition for the UIO attribute <em>control_type</em>,
“control_type_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>control_type</em>,
“is_enabled” :: [bool] :: the condition for the UIO attribute <em>is_enabled</em>. If UI object is enabled on GUI,
“is_visible” :: [bool] :: the condition for the UIO attribute <em>is_visible</em>. 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.</p>
</dd>
</dl>
<p>},
{ … specification next level UIO }</p>
</dd>
</dl>
<dl class="simple">
<dt>]</dt><dd><p><a href="#id7"><span class="problematic" id="id8">``</span></a><a href="#id9"><span class="problematic" id="id10">`</span></a></p>
</dd>
<dt><strong>The UIO selector example</strong></dt><dd><p><a href="#id11"><span class="problematic" id="id12">``</span></a><a href="#id13"><span class="problematic" id="id14">`</span></a></p>
</dd>
</dl>
<dl class="simple">
<dt>[</dt><dd><p>{“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)</p>
</dd>
</dl>
<dl class="simple">
<dt>]</dt><dd><p><a href="#id15"><span class="problematic" id="id16">``</span></a><a href="#id17"><span class="problematic" id="id18">`</span></a></p>
</dd>
</dl>
</div>
<div class="section" id="the-uidesktop-module-openrpa-robot-uidesktop-py">
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<a class="headerlink" href="#the-uidesktop-module-openrpa-robot-uidesktop-py" title="Permalink to this headline"></a></h3>
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># EXAMPLE 1</span> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="c1"># EXAMPLE 1</span>
<span class="kn">from</span> <span class="nn">pyOpenRPA.Robot</span> <span class="kn">import</span> <span class="n">UIDesktop</span> <span class="kn">from</span> <span class="nn">pyOpenRPA.Robot</span> <span class="kn">import</span> <span class="n">UIDesktop</span>
@ -217,21 +292,39 @@
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorSecs_WaitDisappear_Bool</span></code></a>(…)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorSecs_WaitDisappear_Bool</span></code></a>(…)</p></td>
<td><p>Wait for UI object will disappear in GUI for inWaitSecs seconds.</p></td> <td><p>Wait for UI object will disappear in GUI for inWaitSecs seconds.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Exist_Bool</span></code></a>(inUIOSelector)</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorUIOActivity_Run_Dict</span></code></a>(…[, …])</p></td>
<td><p>Run the activity in UIO (UI Object)</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Exist_Bool</span></code></a>(inUIOSelector)</p></td>
<td><p>Check if object is exist by the UIO selector.</p></td> <td><p>Check if object is exist by the UIO selector.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_BitnessInt</span></code></a>(inSpecificationList)</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_FocusHighlight</span></code></a>(inUIOSelector)</p></td>
<td><p>Set focus and highlight (draw outline) the element (in app) by the UIO selector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_GetChildList_UIOList</span></code></a>([…])</p></td>
<td><p>Get list of child UIOs by the parent UIOSelector</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_BitnessInt</span></code></a>(inSpecificationList)</p></td>
<td><p>Detect process bitness by the UI Object UIO Selector.</p></td> <td><p>Detect process bitness by the UI Object UIO Selector.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_BitnessStr</span></code></a>(inSpecificationList)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_BitnessStr</span></code></a>(inSpecificationList)</p></td>
<td><p>Detect process bitness by the UI Object UIO Selector.</p></td> <td><p>Detect process bitness by the UI Object UIO Selector.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIO</span></code></a>(inSpecificationList[, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIO</span></code></a>(inSpecificationList[, …])</p></td>
<td><p>Get the pywinauto object by the UIO selector.</p></td> <td><p>Get the pywinauto object by the UIO selector.</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOList</span></code></a>(inSpecificationList)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOActivityList</span></code></a>(inUIOSelector)</p></td>
<td><p>Get the list of the UI object activities</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOInfo</span></code></a>(inUIOSelector)</p></td>
<td><p>Get the UIO dict of the attributes</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Get_UIOList</span></code></a>(inSpecificationList)</p></td>
<td><p>Get the UIO list by the selector</p></td> <td><p>Get the UIO list by the selector</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_Highlight</span></code></a>(inUIOSelector)</p></td>
<td><p>Highlight (draw outline) the element (in app) by the UIO selector.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SafeOtherGet_Process</span></code></a>(inUIOSelector)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SafeOtherGet_Process</span></code></a>(inUIOSelector)</p></td>
<td><p>Safe get other process or None if destination app is the other/same bitness</p></td> <td><p>Safe get other process or None if destination app is the other/same bitness</p></td>
</tr> </tr>
@ -241,10 +334,13 @@
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SearchChildByMouse_UIOTree</span></code></a>(…)</p></td> <tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_SearchChildByMouse_UIOTree</span></code></a>(…)</p></td>
<td><p>!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</p></td> <td><p>!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</p></td>
</tr> </tr>
<tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorsSecs_WaitAppear_List</span></code></a>(…[, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict" title="pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelector_TryRestore_Dict</span></code></a>(inSpecificationList)</p></td>
<td><p>Try to restore (maximize) window, if its minimized.</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorsSecs_WaitAppear_List</span></code></a>(…[, …])</p></td>
<td><p>Wait for many UI object will appear in GUI for inWaitSecs seconds.</p></td> <td><p>Wait for many UI object will appear in GUI for inWaitSecs seconds.</p></td>
</tr> </tr>
<tr class="row-odd"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorsSecs_WaitDisappear_List</span></code></a>(…[, …])</p></td> <tr class="row-even"><td><p><a class="reference internal" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List" title="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List"><code class="xref py py-obj docutils literal notranslate"><span class="pre">UIOSelectorsSecs_WaitDisappear_List</span></code></a>(…[, …])</p></td>
<td><p>Wait for many UI object will disappear in GUI for inWaitSecs seconds.</p></td> <td><p>Wait for many UI object will disappear in GUI for inWaitSecs seconds.</p></td>
</tr> </tr>
</tbody> </tbody>
@ -324,6 +420,25 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorUIOActivity_Run_Dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em>, <em class="sig-param"><span class="n">inActionName</span></em>, <em class="sig-param"><span class="n">inArgumentList</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inkwArgumentObject</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorUIOActivity_Run_Dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict" title="Permalink to this definition"></a></dt>
<dd><p>Run the activity in UIO (UI Object)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p></li>
<li><p><strong>inActionName</strong> UIOActivity (name) activity name string from Pywinauto</p></li>
<li><p><strong>inArgumentList</strong> </p></li>
<li><p><strong>inkwArgumentObject</strong> </p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Exist_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Exist_Bool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Exist_Bool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Exist_Bool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool" title="Permalink to this definition"></a></dt>
@ -338,6 +453,37 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_FocusHighlight</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_FocusHighlight"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight" title="Permalink to this definition"></a></dt>
<dd><p>Set focus and highlight (draw outline) the element (in app) by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_GetChildList_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inBackend</span><span class="o">=</span><span class="default_value">'win32'</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_GetChildList_UIOList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList" title="Permalink to this definition"></a></dt>
<dd><p>Get list of child UIOs by the parent UIOSelector</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p></li>
<li><p><strong>inBackend</strong> “win32” or “uia”</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_BitnessInt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_BitnessInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_BitnessInt</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_BitnessInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt" title="Permalink to this definition"></a></dt>
@ -384,6 +530,34 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOActivityList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOActivityList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList" title="Permalink to this definition"></a></dt>
<dd><p>Get the list of the UI object activities</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOInfo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo" title="Permalink to this definition"></a></dt>
<dd><p>Get the UIO dict of the attributes</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inElement</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inFlagRaiseException</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Get_UIOList</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em>, <em class="sig-param"><span class="n">inElement</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">inFlagRaiseException</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Get_UIOList"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList" title="Permalink to this definition"></a></dt>
@ -402,6 +576,20 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_Highlight</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_Highlight"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight" title="Permalink to this definition"></a></dt>
<dd><p>Highlight (draw outline) the element (in app) by the UIO selector.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inUIOSelector</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SafeOtherGet_Process</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SafeOtherGet_Process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_SafeOtherGet_Process</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inUIOSelector</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_SafeOtherGet_Process"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process" title="Permalink to this definition"></a></dt>
@ -446,6 +634,20 @@ Example: [{“title”:”notepad”},{“title”:”OK”}]</p></li>
</dl> </dl>
</dd></dl> </dd></dl>
<dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelector_TryRestore_Dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationList</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelector_TryRestore_Dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict" title="Permalink to this definition"></a></dt>
<dd><p>Try to restore (maximize) window, if its minimized. (!IMPORTANT! When use UIA framework minimized windows doesnt appear by the UIOSelector. You need to try restore windows and after that try to get UIO)</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>inSpecificationList</strong> UIOSelector - List of items, which contains condition attributes</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p></p>
</dd>
</dl>
</dd></dl>
<dl class="py function"> <dl class="py function">
<dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List"> <dt id="pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">
<code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorsSecs_WaitAppear_List</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationListList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em>, <em class="sig-param"><span class="n">inFlagWaitAllInMoment</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorsSecs_WaitAppear_List"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="Permalink to this definition"></a></dt> <code class="sig-prename descclassname">pyOpenRPA.Robot.UIDesktop.</code><code class="sig-name descname">UIOSelectorsSecs_WaitAppear_List</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">inSpecificationListList</span></em>, <em class="sig-param"><span class="n">inWaitSecs</span></em>, <em class="sig-param"><span class="n">inFlagWaitAllInMoment</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/pyOpenRPA/Robot/UIDesktop.html#UIOSelectorsSecs_WaitAppear_List"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List" title="Permalink to this definition"></a></dt>
@ -499,12 +701,13 @@ Example: [</p>
</dl> </dl>
</dd></dl> </dd></dl>
</div>
</div> </div>
<div class="section" id="references"> <div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline"></a></h2> <h2>References<a class="headerlink" href="#references" title="Permalink to this headline"></a></h2>
<p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id1" id="id2">1</a></p> <p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> <a class="footnote-reference brackets" href="#id19" id="id20">1</a></p>
<dl class="footnote brackets"> <dl class="footnote brackets">
<dt class="label" id="id1"><span class="brackets"><a class="fn-backref" href="#id2">1</a></span></dt> <dt class="label" id="id19"><span class="brackets"><a class="fn-backref" href="#id20">1</a></span></dt>
<dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p> <dd><p><a class="reference external" href="http://docutils.sourceforge.net/rst.html">http://docutils.sourceforge.net/rst.html</a></p>
</dd> </dd>
</dl> </dl>

@ -97,19 +97,32 @@
<li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li> <li class="toctree-l1"><a class="reference internal" href="01_Robot.html">1. Description</a></li>
<li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li> <li class="toctree-l1"><a class="reference internal" href="02_Defs.html">2. Defs</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">3. How to use</a><ul> <li class="toctree-l1 current"><a class="current reference internal" href="#">3. How to use</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#content">Content</a></li> <li class="toctree-l2"><a class="reference internal" href="#how-to-execute-rpa-script">How to execute RPA script</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#about">About</a></li>
<li class="toctree-l2"><a class="reference internal" href="#way-to-use">Way to use</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#create-python-script">Create python script</a></li> <li class="toctree-l3"><a class="reference internal" href="#create-python-script">Create python script</a></li>
</ul> <li class="toctree-l3"><a class="reference internal" href="#execute-python-script">Execute python script</a></li>
</li>
<li class="toctree-l2"><a class="reference internal" href="#execute-python-script">Execute python script</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x32">Execute in the Python x32</a></li> <li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x32">Execute in the Python x32</a></li>
<li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x64">Execute in the Python x64</a></li> <li class="toctree-l3"><a class="reference internal" href="#execute-in-the-python-x64">Execute in the Python x64</a></li>
<li class="toctree-l3"><a class="reference internal" href="#execute-from-cmd-file">Execute from .cmd file</a></li> <li class="toctree-l3"><a class="reference internal" href="#execute-from-cmd-file">Execute from .cmd file</a></li>
<li class="toctree-l3"><a class="reference internal" href="#use-in-studio-script-n-a">Use in studio script (n/a)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-desktop-app-ui-access-win32-and-ui-automation-dlls">Theory &amp; practice. Desktop app UI access (win32 and UI automation dlls)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#definitions">Definitions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#what-is-uio">What is UIO?</a></li>
<li class="toctree-l3"><a class="reference internal" href="#uioselector-structure-example">UIOSelector structure &amp; example</a></li>
<li class="toctree-l3"><a class="reference internal" href="#the-uidesktop-module-openrpa-robot-uidesktop-py">The UIDesktop module (OpenRPA/Robot/UIDesktop.py)</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-web-app-ui-access-selenium">Theory &amp; practice. WEB app UI access (selenium)</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#about">About</a></li>
<li class="toctree-l3"><a class="reference internal" href="#id19">How to use</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-keyboard-mouse-manipulation">Theory &amp; practice. Keyboard &amp; mouse manipulation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#theory-practice-screen-capture-image-recognition">Theory &amp; practice. Screen capture &amp; image recognition</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#how-to-automate-image-recognition-on-pc">How to automate image recognition on PC</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l2"><a class="reference internal" href="#use-in-studio-script-n-a">Use in studio script (n/a)</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="04_Dependencies.html">4. Dependencies</a></li> <li class="toctree-l1"><a class="reference internal" href="04_Dependencies.html">4. Dependencies</a></li>
@ -194,21 +207,9 @@
<div class="section" id="how-to-use"> <div class="section" id="how-to-use">
<h1>3. How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline"></a></h1> <h1>3. How to use<a class="headerlink" href="#how-to-use" title="Permalink to this headline"></a></h1>
<div class="section" id="content">
<h2>Content<a class="headerlink" href="#content" title="Permalink to this headline"></a></h2>
<ul class="simple">
<li><p><a class="reference external" href="#about">About</a></p></li>
<li><p><a class="reference external" href="#way-to-use">How to use</a></p></li>
<li><p><a class="reference external" href="#create-python-script">Create python script</a></p></li>
<li><p><a class="reference external" href="#execute-python-script">Execute python script</a></p></li>
</ul>
</div>
<div class="section" id="about">
<h2>About<a class="headerlink" href="#about" title="Permalink to this headline"></a></h2>
<p>The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA.</p> <p>The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA.</p>
</div> <div class="section" id="how-to-execute-rpa-script">
<div class="section" id="way-to-use"> <h2>How to execute RPA script<a class="headerlink" href="#how-to-execute-rpa-script" title="Permalink to this headline"></a></h2>
<h2>Way to use<a class="headerlink" href="#way-to-use" title="Permalink to this headline"></a></h2>
<p>You can use the robot by the several ways:</p> <p>You can use the robot by the several ways:</p>
<ul class="simple"> <ul class="simple">
<li><p>In Python script</p></li> <li><p>In Python script</p></li>
@ -227,13 +228,13 @@
</pre></div> </pre></div>
</div> </div>
</div> </div>
</div>
<div class="section" id="execute-python-script"> <div class="section" id="execute-python-script">
<h2>Execute python script<a class="headerlink" href="#execute-python-script" title="Permalink to this headline"></a></h2> <h3>Execute python script<a class="headerlink" href="#execute-python-script" title="Permalink to this headline"></a></h3>
<p>The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways: <p>The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2) - Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2)
- Execute in python x64 (OpenRPAResourcesWPy64-3720python-3.7.2.amd64) - Execute in python x64 (OpenRPAResourcesWPy64-3720python-3.7.2.amd64)
- Execute from .cmd file</p> - Execute from .cmd file</p>
</div>
<div class="section" id="execute-in-the-python-x32"> <div class="section" id="execute-in-the-python-x32">
<h3>Execute in the Python x32<a class="headerlink" href="#execute-in-the-python-x32" title="Permalink to this headline"></a></h3> <h3>Execute in the Python x32<a class="headerlink" href="#execute-in-the-python-x32" title="Permalink to this headline"></a></h3>
<p>To execute your python script in x32 bit version just write in command line from x32 python directory:</p> <p>To execute your python script in x32 bit version just write in command line from x32 python directory:</p>
@ -260,9 +261,8 @@
</pre></div> </pre></div>
</div> </div>
</div> </div>
</div>
<div class="section" id="use-in-studio-script-n-a"> <div class="section" id="use-in-studio-script-n-a">
<h2>Use in studio script (n/a)<a class="headerlink" href="#use-in-studio-script-n-a" title="Permalink to this headline"></a></h2> <h3>Use in studio script (n/a)<a class="headerlink" href="#use-in-studio-script-n-a" title="Permalink to this headline"></a></h3>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span> <div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">sys</span>
<span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../../&#39;</span><span class="p">)</span> <span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s1">&#39;../../&#39;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">GUI</span> <span class="kn">import</span> <span class="nn">GUI</span>
@ -270,17 +270,131 @@
<span class="kn">import</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">import</span> <span class="nn">time</span> <span class="kn">import</span> <span class="nn">time</span>
<span class="c1">#Highlight the UI Object in Folder explorer&lt;br&gt;</span> <span class="c1">#Highlight the UI Object in Folder explorer</span>
<span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_FocusHighlight</span><span class="p">([{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CabinetWClass&quot;</span><span class="p">,</span><span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;uia&quot;</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span><span class="o">&lt;</span><span class="n">br</span><span class="o">&gt;</span> <span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_FocusHighlight</span><span class="p">([{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CabinetWClass&quot;</span><span class="p">,</span><span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;uia&quot;</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span>
<span class="c1">#Wait 2 seconds&lt;br&gt;</span> <span class="c1">#Wait 2 seconds</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span><span class="o">&lt;</span><span class="n">br</span><span class="o">&gt;</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mi">3</span><span class="p">)</span>
<span class="c1">#Loop: get child element of UI List&lt;br&gt;</span> <span class="c1">#Loop: get child element of UI List</span>
<span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">([{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CabinetWClass&quot;</span><span class="p">,</span><span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;uia&quot;</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span><span class="o">.</span><span class="n">children</span><span class="p">():</span><span class="o">&lt;</span><span class="n">br</span><span class="o">&gt;</span> <span class="k">for</span> <span class="n">lItem</span> <span class="ow">in</span> <span class="n">GUI</span><span class="o">.</span><span class="n">UIOSelector_Get_UIO</span><span class="p">([{</span><span class="s2">&quot;class_name&quot;</span><span class="p">:</span><span class="s2">&quot;CabinetWClass&quot;</span><span class="p">,</span><span class="s2">&quot;backend&quot;</span><span class="p">:</span><span class="s2">&quot;uia&quot;</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">2</span><span class="p">},{</span><span class="s2">&quot;ctrl_index&quot;</span><span class="p">:</span><span class="mi">0</span><span class="p">}])</span><span class="o">.</span><span class="n">children</span><span class="p">():</span>
<span class="o">&amp;</span><span class="n">nbsp</span><span class="p">;</span> <span class="o">&amp;</span><span class="n">nbsp</span><span class="p">;</span> <span class="o">&amp;</span><span class="n">nbsp</span><span class="p">;</span> <span class="o">&amp;</span><span class="n">nbsp</span><span class="p">;</span> <span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">lItem</span><span class="p">))</span> <span class="nb">print</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">lItem</span><span class="p">))</span>
</pre></div> </pre></div>
</div> </div>
<p>Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.</p>
</div>
</div>
<div class="section" id="theory-practice-desktop-app-ui-access-win32-and-ui-automation-dlls">
<h2>Theory &amp; practice. Desktop app UI access (win32 and UI automation dlls)<a class="headerlink" href="#theory-practice-desktop-app-ui-access-win32-and-ui-automation-dlls" title="Permalink to this headline"></a></h2>
<div class="section" id="definitions">
<h3>Definitions<a class="headerlink" href="#definitions" title="Permalink to this headline"></a></h3>
<p><strong>UIO</strong> - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]&lt;br&gt;
<strong>UIOSelector</strong> - List of dict (key attributes)&lt;br&gt;
<strong>PWA</strong> - PyWinAuto&lt;br&gt;
<strong>PWASpecification</strong> - List of dict (key attributes in pywinauto.find_window notation)&lt;br&gt;
<strong>UIOTree</strong> - Recursive Dict of Dict … (UI Parent -&gt; Child hierarchy)&lt;br&gt;
<strong>UIOInfo</strong> - Dict of UIO attributes&lt;br&gt;
<strong>UIOActivity</strong> - Activity of the UIO (UI object) from the Pywinauto module&lt;br&gt;
<strong>UIOEI</strong> - UI Object info object</p>
</div>
<div class="section" id="what-is-uio">
<h3>What is UIO?<a class="headerlink" href="#what-is-uio" title="Permalink to this headline"></a></h3>
<p>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)](<a class="reference external" href="https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html">https://pywinauto.readthedocs.io/en/latest/code/pywinauto.base_wrapper.html</a>).</p>
<p>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.</p>
</div>
<div class="section" id="uioselector-structure-example">
<h3>UIOSelector structure &amp; example<a class="headerlink" href="#uioselector-structure-example" title="Permalink to this headline"></a></h3>
<p>&lt;a name=”UIOSelector_Structure_Examples”&gt;&lt;/a&gt;
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.</p>
<dl class="simple">
<dt><strong>Desciption</strong></dt><dd><p><a href="#id1"><span class="problematic" id="id2">``</span></a><a href="#id3"><span class="problematic" id="id4">`</span></a></p>
</dd>
</dl>
<dl>
<dt>[</dt><dd><dl class="simple">
<dt>{</dt><dd><p>“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 <em>title</em>,
“title_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>title</em>,
“rich_text” :: [str] :: the condition for the UIO attribute <em>rich_text</em>,
“rich_text_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>rich_text</em>,
“class_name” :: [str] :: the condition for the UIO attribute <em>class_name</em>,
“class_name_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>class_name</em>,
“friendly_class_name” :: [str] :: the condition for the UIO attribute <em>friendly_class_name</em>,
“friendly_class_name_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>friendly_class_name</em>,
“control_type” :: [str] :: the condition for the UIO attribute <em>control_type</em>,
“control_type_re” :: [str] :: regular expression (python ver) for the condition for the UIO attribute <em>control_type</em>,
“is_enabled” :: [bool] :: the condition for the UIO attribute <em>is_enabled</em>. If UI object is enabled on GUI,
“is_visible” :: [bool] :: the condition for the UIO attribute <em>is_visible</em>. 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.</p>
</dd>
</dl>
<p>},
{ … specification next level UIO }</p>
</dd>
</dl>
<dl class="simple">
<dt>]</dt><dd><p><a href="#id5"><span class="problematic" id="id6">``</span></a><a href="#id7"><span class="problematic" id="id8">`</span></a></p>
</dd>
<dt><strong>The UIO selector example</strong></dt><dd><p><a href="#id9"><span class="problematic" id="id10">``</span></a><a href="#id11"><span class="problematic" id="id12">`</span></a></p>
</dd>
</dl>
<dl class="simple">
<dt>[</dt><dd><p>{“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)</p>
</dd>
</dl>
<dl class="simple">
<dt>]</dt><dd><p><a href="#id13"><span class="problematic" id="id14">``</span></a><a href="#id15"><span class="problematic" id="id16">`</span></a></p>
</dd>
</dl>
</div>
<div class="section" id="the-uidesktop-module-openrpa-robot-uidesktop-py">
<h3>The UIDesktop module (OpenRPA/Robot/UIDesktop.py)<a class="headerlink" href="#the-uidesktop-module-openrpa-robot-uidesktop-py" title="Permalink to this headline"></a></h3>
<p>The UIDesktop is extension of the pywinauto module which provide access to the desktop apps by the <strong>win32</strong> and <strong>ui automation</strong> dll frameworks (big thx to the Microsoft :) ).</p>
<p><a href="#id17"><span class="problematic" id="id18">*</span></a>Naming convention: &lt;InArgument&gt;_&lt;ActivityName&gt;_&lt;OutArgument - if exist&gt;*&lt;br&gt;</p>
</div>
</div>
<div class="section" id="theory-practice-web-app-ui-access-selenium">
<h2>Theory &amp; practice. WEB app UI access (selenium)<a class="headerlink" href="#theory-practice-web-app-ui-access-selenium" title="Permalink to this headline"></a></h2>
<div class="section" id="about">
<h3>About<a class="headerlink" href="#about" title="Permalink to this headline"></a></h3>
<p>The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here (<a class="reference external" href="https://selenium-python.readthedocs.io/">https://selenium-python.readthedocs.io/</a>)</p>
</div>
<div class="section" id="id19">
<h3>How to use<a class="headerlink" href="#id19" title="Permalink to this headline"></a></h3>
<p>To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.</p>
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">selenium</span> <span class="kn">import</span> <span class="n">webdriver</span>
<span class="kn">from</span> <span class="nn">selenium.webdriver.common.keys</span> <span class="kn">import</span> <span class="n">Keys</span>
<span class="n">driver</span> <span class="o">=</span> <span class="n">webdriver</span><span class="o">.</span><span class="n">Chrome</span><span class="p">()</span>
<span class="n">driver</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;http://www.python.org&quot;</span><span class="p">)</span>
<span class="k">assert</span> <span class="s2">&quot;Python&quot;</span> <span class="ow">in</span> <span class="n">driver</span><span class="o">.</span><span class="n">title</span>
<span class="n">elem</span> <span class="o">=</span> <span class="n">driver</span><span class="o">.</span><span class="n">find_element_by_name</span><span class="p">(</span><span class="s2">&quot;q&quot;</span><span class="p">)</span>
<span class="n">elem</span><span class="o">.</span><span class="n">clear</span><span class="p">()</span>
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="s2">&quot;pycon&quot;</span><span class="p">)</span>
<span class="n">elem</span><span class="o">.</span><span class="n">send_keys</span><span class="p">(</span><span class="n">Keys</span><span class="o">.</span><span class="n">RETURN</span><span class="p">)</span>
<span class="k">assert</span> <span class="s2">&quot;No results found.&quot;</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">driver</span><span class="o">.</span><span class="n">page_source</span>
<span class="n">driver</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="theory-practice-keyboard-mouse-manipulation">
<h2>Theory &amp; practice. Keyboard &amp; mouse manipulation<a class="headerlink" href="#theory-practice-keyboard-mouse-manipulation" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="theory-practice-screen-capture-image-recognition">
<h2>Theory &amp; practice. Screen capture &amp; image recognition<a class="headerlink" href="#theory-practice-screen-capture-image-recognition" title="Permalink to this headline"></a></h2>
<div class="section" id="how-to-automate-image-recognition-on-pc">
<h3>How to automate image recognition on PC<a class="headerlink" href="#how-to-automate-image-recognition-on-pc" title="Permalink to this headline"></a></h3>
<p>Here you can find any ways you need to use in your business case:
- Find the exact match on the screen with the other image
- Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition</p>
</div>
</div> </div>
</div> </div>

@ -957,7 +957,13 @@
<span class="c1">#(особенность uia backend - он не может прицепиться к окну, если оно свернуто)</span> <span class="c1">#(особенность uia backend - он не может прицепиться к окну, если оно свернуто)</span>
<span class="c1">#inSpecificationList - UIOSelector</span> <span class="c1">#inSpecificationList - UIOSelector</span>
<span class="c1">#old name - PywinautoExtTryToRestore</span> <span class="c1">#old name - PywinautoExtTryToRestore</span>
<span class="k">def</span> <span class="nf">UIOSelector_TryRestore_Dict</span><span class="p">(</span><span class="n">inSpecificationList</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelector_TryRestore_Dict"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict">[docs]</a><span class="k">def</span> <span class="nf">UIOSelector_TryRestore_Dict</span><span class="p">(</span><span class="n">inSpecificationList</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Try to restore (maximize) window, if it&#39;s minimized. (!IMPORTANT! When use UIA framework minimized windows doesn&#39;t appear by the UIOSelector. You need to try restore windows and after that try to get UIO)</span>
<span class="sd"> :param inSpecificationList: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">lResult</span><span class="o">=</span><span class="p">{}</span> <span class="n">lResult</span><span class="o">=</span><span class="p">{}</span>
<span class="k">try</span><span class="p">:</span> <span class="k">try</span><span class="p">:</span>
<span class="c1">#Подготовка взодного массива</span> <span class="c1">#Подготовка взодного массива</span>
@ -969,13 +975,19 @@
<span class="n">lRPAApplication</span><span class="o">.</span><span class="n">top_window</span><span class="p">()</span><span class="o">.</span><span class="n">restore</span><span class="p">()</span> <span class="n">lRPAApplication</span><span class="o">.</span><span class="n">top_window</span><span class="p">()</span><span class="o">.</span><span class="n">restore</span><span class="p">()</span>
<span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span> <span class="k">except</span> <span class="ne">Exception</span><span class="p">:</span>
<span class="kc">True</span><span class="o">==</span><span class="kc">False</span> <span class="kc">True</span><span class="o">==</span><span class="kc">False</span>
<span class="k">return</span> <span class="n">lResult</span> <span class="k">return</span> <span class="n">lResult</span></div>
<span class="c1">####################################################################################################</span> <span class="c1">####################################################################################################</span>
<span class="c1">#Get the list of the UI object activities</span> <span class="c1">#Get the list of the UI object activities</span>
<span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span> <span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span>
<span class="c1">#inControlSpecificationArray - UIOSelector</span> <span class="c1">#inControlSpecificationArray - UIOSelector</span>
<span class="c1">#old name - ElementActionGetList</span> <span class="c1">#old name - ElementActionGetList</span>
<span class="k">def</span> <span class="nf">UIOSelector_Get_UIOActivityList</span> <span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelector_Get_UIOActivityList"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList">[docs]</a><span class="k">def</span> <span class="nf">UIOSelector_Get_UIOActivityList</span> <span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the list of the UI object activities</span>
<span class="sd"> :param inUIOSelector: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1">#Check the bitness</span> <span class="c1">#Check the bitness</span>
<span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span> <span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
@ -1005,7 +1017,7 @@
<span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span> <span class="n">lResult</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">lResult</span> <span class="k">return</span> <span class="n">lResult</span></div>
<span class="c1">####################################################################################################</span> <span class="c1">####################################################################################################</span>
<span class="c1">#Run the activity in UIO (UI Object)</span> <span class="c1">#Run the activity in UIO (UI Object)</span>
@ -1013,7 +1025,16 @@
<span class="c1">#inUIOSelector</span> <span class="c1">#inUIOSelector</span>
<span class="c1">#inActionName - UIOActivity (name) from Pywinauto</span> <span class="c1">#inActionName - UIOActivity (name) from Pywinauto</span>
<span class="c1">#old name - ElementRunAction</span> <span class="c1">#old name - ElementRunAction</span>
<span class="k">def</span> <span class="nf">UIOSelectorUIOActivity_Run_Dict</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">,</span> <span class="n">inActionName</span><span class="p">,</span> <span class="n">inArgumentList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inkwArgumentObject</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelectorUIOActivity_Run_Dict"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict">[docs]</a><span class="k">def</span> <span class="nf">UIOSelectorUIOActivity_Run_Dict</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">,</span> <span class="n">inActionName</span><span class="p">,</span> <span class="n">inArgumentList</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inkwArgumentObject</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Run the activity in UIO (UI Object)</span>
<span class="sd"> :param inUIOSelector: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :param inActionName: UIOActivity (name) activity name string from Pywinauto</span>
<span class="sd"> :param inArgumentList:</span>
<span class="sd"> :param inkwArgumentObject:</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inArgumentList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgumentList</span><span class="o">=</span><span class="p">[]</span> <span class="c1"># 2021 02 22 Minor fix by Ivan Maslov</span> <span class="k">if</span> <span class="n">inArgumentList</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inArgumentList</span><span class="o">=</span><span class="p">[]</span> <span class="c1"># 2021 02 22 Minor fix by Ivan Maslov</span>
<span class="k">if</span> <span class="n">inkwArgumentObject</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inkwArgumentObject</span><span class="o">=</span><span class="p">{}</span> <span class="c1"># 2021 02 22 Minor fix by Ivan Maslov</span> <span class="k">if</span> <span class="n">inkwArgumentObject</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inkwArgumentObject</span><span class="o">=</span><span class="p">{}</span> <span class="c1"># 2021 02 22 Minor fix by Ivan Maslov</span>
<span class="n">lResult</span><span class="o">=</span><span class="p">{}</span> <span class="n">lResult</span><span class="o">=</span><span class="p">{}</span>
@ -1056,13 +1077,19 @@
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="n">lResult</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span> <span class="n">lResult</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">lResult</span> <span class="k">return</span> <span class="n">lResult</span></div>
<span class="c1">####################################################################################################</span> <span class="c1">####################################################################################################</span>
<span class="c1">#Get the UIO dict of the attributes</span> <span class="c1">#Get the UIO dict of the attributes</span>
<span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span> <span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span>
<span class="c1">#old name - ElementGetInfo</span> <span class="c1">#old name - ElementGetInfo</span>
<span class="k">def</span> <span class="nf">UIOSelector_Get_UIOInfo</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelector_Get_UIOInfo"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo">[docs]</a><span class="k">def</span> <span class="nf">UIOSelector_Get_UIOInfo</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the UIO dict of the attributes</span>
<span class="sd"> :param inUIOSelector: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1">#Check the bitness</span> <span class="c1">#Check the bitness</span>
<span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span> <span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
@ -1091,7 +1118,7 @@
<span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="n">lResultList</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span> <span class="n">lResultList</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">lResultList</span> <span class="k">return</span> <span class="n">lResultList</span></div>
<span class="c1">####################################################################################################</span> <span class="c1">####################################################################################################</span>
<span class="c1">#Search child UIO by the: Parent UIO, X, Y</span> <span class="c1">#Search child UIO by the: Parent UIO, X, Y</span>
<span class="c1">#inHierarchyList: [{&quot;index&quot;:&lt;&gt;,&quot;element&quot;:&lt;&gt;}] - technical argument for internal purpose</span> <span class="c1">#inHierarchyList: [{&quot;index&quot;:&lt;&gt;,&quot;element&quot;:&lt;&gt;}] - technical argument for internal purpose</span>
@ -1187,7 +1214,16 @@
<span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span> <span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span>
<span class="c1">#inControlSpecificationArray- UIOSelector</span> <span class="c1">#inControlSpecificationArray- UIOSelector</span>
<span class="c1">#old name - ElementGetChildElementList</span> <span class="c1">#old name - ElementGetChildElementList</span>
<span class="k">def</span> <span class="nf">UIOSelector_GetChildList_UIOList</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inBackend</span><span class="o">=</span><span class="n">mDefaultPywinautoBackend</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelector_GetChildList_UIOList"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList">[docs]</a><span class="k">def</span> <span class="nf">UIOSelector_GetChildList_UIOList</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">inBackend</span><span class="o">=</span><span class="n">mDefaultPywinautoBackend</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get list of child UIO&#39;s by the parent UIOSelector</span>
<span class="sd"> :param inUIOSelector: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :param inBackend: &quot;win32&quot; or &quot;uia&quot;</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">inUIOSelector</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inUIOSelector</span> <span class="o">=</span> <span class="p">[]</span> <span class="k">if</span> <span class="n">inUIOSelector</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="n">inUIOSelector</span> <span class="o">=</span> <span class="p">[]</span>
<span class="c1">#mRobotLogger.info(f&quot;File!!!!&quot;)</span> <span class="c1">#mRobotLogger.info(f&quot;File!!!!&quot;)</span>
<span class="c1">#mRobotLogger.info(f&quot;inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}&quot;)</span> <span class="c1">#mRobotLogger.info(f&quot;inSelector:{str(inUIOSelector)}, inBackend:{str(inBackend)}&quot;)</span>
@ -1235,7 +1271,7 @@
<span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="n">lResultList</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span> <span class="n">lResultList</span> <span class="o">=</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="n">lResultList</span> <span class="k">return</span> <span class="n">lResultList</span></div>
<span class="c1">####################################################################################################</span> <span class="c1">####################################################################################################</span>
<span class="c1">#Подготовить массив для обращшения к поиску элемементов</span> <span class="c1">#Подготовить массив для обращшения к поиску элемементов</span>
@ -1476,7 +1512,13 @@
<span class="c1">#Highlight the UI object</span> <span class="c1">#Highlight the UI object</span>
<span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span> <span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span>
<span class="c1">#old name - ElementDrawOutlineNew</span> <span class="c1">#old name - ElementDrawOutlineNew</span>
<span class="k">def</span> <span class="nf">UIOSelector_Highlight</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelector_Highlight"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight">[docs]</a><span class="k">def</span> <span class="nf">UIOSelector_Highlight</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Highlight (draw outline) the element (in app) by the UIO selector.</span>
<span class="sd"> :param inUIOSelector: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1">#Check the bitness</span> <span class="c1">#Check the bitness</span>
<span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span> <span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
@ -1495,13 +1537,20 @@
<span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span> <span class="k">return</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="kc">True</span> <span class="k">return</span> <span class="kc">True</span></div>
<span class="c1">###################################################################################################</span> <span class="c1">###################################################################################################</span>
<span class="c1">#inSpecificationArray - UIOSelector</span> <span class="c1">#inSpecificationArray - UIOSelector</span>
<span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span> <span class="c1">#!!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!</span>
<span class="c1">#old name - ElementDrawOutlineNewFocus</span> <span class="c1">#old name - ElementDrawOutlineNewFocus</span>
<span class="k">def</span> <span class="nf">UIOSelector_FocusHighlight</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span> <div class="viewcode-block" id="UIOSelector_FocusHighlight"><a class="viewcode-back" href="../../../Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight">[docs]</a><span class="k">def</span> <span class="nf">UIOSelector_FocusHighlight</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Set focus and highlight (draw outline) the element (in app) by the UIO selector.</span>
<span class="sd"> :param inUIOSelector: UIOSelector - List of items, which contains condition attributes</span>
<span class="sd"> :return:</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="c1">#Check the bitness</span> <span class="c1">#Check the bitness</span>
<span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span> <span class="n">lSafeOtherProcess</span> <span class="o">=</span> <span class="n">UIOSelector_SafeOtherGet_Process</span><span class="p">(</span><span class="n">inUIOSelector</span><span class="p">)</span>
<span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span> <span class="k">if</span> <span class="n">lSafeOtherProcess</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
@ -1520,7 +1569,7 @@
<span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span> <span class="sa">f</span><span class="s2">&quot;Exception was occured in child process (message): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorMessage&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">, (traceback): </span><span class="si">{</span><span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s1">&#39;ErrorTraceback&#39;</span><span class="p">]</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span> <span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span> <span class="k">return</span> <span class="n">lPIPEResponseDict</span><span class="p">[</span><span class="s2">&quot;Result&quot;</span><span class="p">]</span>
<span class="k">return</span> <span class="kc">True</span> <span class="k">return</span> <span class="kc">True</span></div>
<span class="c1">###################################################################################################</span> <span class="c1">###################################################################################################</span>
<span class="c1">#old name - draw_outline_new</span> <span class="c1">#old name - draw_outline_new</span>

@ -17,10 +17,12 @@ Ivan Maslov (founder)
- Skype: MegaFinder - Skype: MegaFinder
- Facebook: https://www.facebook.com/RU.Ivan.Maslov - Facebook: https://www.facebook.com/RU.IT4Business
- LinkedIn: https://www.linkedin.com/in/RU-IvanMaslov/ - LinkedIn: https://www.linkedin.com/in/RU-IvanMaslov/
- WhatsApp | Telegram: +7 906 722 39 25
************************************************** **************************************************
3-rd party components license dependencies 3-rd party components license dependencies

@ -2,9 +2,69 @@
2. Defs 2. Defs
#################################### ####################################
************************************************** ****************************************************************************************************
pyOpenRPA.Robot.UIDesktop Desktop app UI access (win32 and UI automation dlls)
************************************************** ****************************************************************************************************
Definitions
############################################
- **UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]
- **UIOSelector** - List of dict (key attributes)
- **PWA** - PyWinAuto
- **PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)
- **UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)
- **UIOInfo** - Dict of UIO attributes
- **UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module
- **UIOEI** - UI Object info object
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 :) ).
.. code-block:: python .. code-block:: python

@ -2,21 +2,10 @@
3. How to use 3. How to use
#################################### ####################################
**************************************************
Content
**************************************************
- `About <#about>`__
- `How to use <#way-to-use>`__
- `Create python script <#create-python-script>`__
- `Execute python script <#execute-python-script>`__
**************************************************
About
**************************************************
The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA. The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA.
************************************************** **************************************************
Way to use How to execute RPA script
************************************************** **************************************************
You can use the robot by the several ways: You can use the robot by the several ways:
@ -39,9 +28,8 @@ In order to use robot just add Robot tool folder in work directory and add line
import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br> import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4.-Theory-&-practice:-Screen-capture-&-image-recognition)<br>
import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br> import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
**************************************************
Execute python script Execute python script
************************************************** ############################################
The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways: The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (\OpenRPA\Resources\WPy32-3720\python-3.7.2) - Execute in python x32 (\OpenRPA\Resources\WPy32-3720\python-3.7.2)
@ -80,9 +68,9 @@ In order to simplify the execution process you can write several code lines in f
.\..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe orchestratorMain.py .\..\Resources\WPy32-3720\python-3.7.2\OpenRPAOrchestrator.exe orchestratorMain.py
pause >nul pause >nul
**************************************************
Use in studio script (n/a) Use in studio script (n/a)
************************************************** ############################################
.. code-block:: python .. code-block:: python
import sys import sys
@ -92,12 +80,129 @@ Use in studio script (n/a)
import subprocess import subprocess
import time import time
#Highlight the UI Object in Folder explorer<br> #Highlight the UI Object in Folder explorer
GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])<br> GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])
#Wait 2 seconds
time.sleep(3)
#Loop: get child element of UI List
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():
print(str(lItem))
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
****************************************************************************************************
Theory & practice. Desktop app UI access (win32 and UI automation dlls)
****************************************************************************************************
Definitions
############################################
**UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]<br>
**UIOSelector** - List of dict (key attributes)<br>
**PWA** - PyWinAuto<br>
**PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)<br>
**UIOTree** - Recursive Dict of Dict ... (UI Parent -> Child hierarchy)<br>
**UIOInfo** - Dict of UIO attributes<br>
**UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module<br>
**UIOEI** - UI Object info object
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**
```
[
{
"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 :) ).
*Naming convention: \<InArgument\>\_\<ActivityName\>\_\<OutArgument - if exist>*<br>
****************************************************************************************************
Theory & practice. WEB app UI access (selenium)
****************************************************************************************************
About
###############################################
The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here (https://selenium-python.readthedocs.io/)
How to use
###############################################
To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.
.. code-block:: python
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
****************************************************************************************************
Theory & practice. Keyboard & mouse manipulation
****************************************************************************************************
****************************************************************************************************
Theory & practice. Screen capture & image recognition
****************************************************************************************************
#Wait 2 seconds<br> How to automate image recognition on PC
time.sleep(3)<br> ###########################################
#Loop: get child element of UI List<br> Here you can find any ways you need to use in your business case:
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():<br> - Find the exact match on the screen with the other image
&nbsp; &nbsp; &nbsp; &nbsp; print(str(lItem)) - Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition

@ -353,22 +353,34 @@
<li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.UACUpdate">UACUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a> <li><a href="Orchestrator/02_Defs.html#pyOpenRPA.Orchestrator.__Orchestrator__.UACUpdate">UACUpdate() (in module pyOpenRPA.Orchestrator.__Orchestrator__)</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">UIOSelector_Exist_Bool() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">UIOSelector_Exist_Bool() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight">UIOSelector_FocusHighlight() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">UIOSelector_Get_BitnessInt() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">UIOSelector_Get_BitnessInt() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr">UIOSelector_Get_BitnessStr() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr">UIOSelector_Get_BitnessStr() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO">UIOSelector_Get_UIO() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO">UIOSelector_Get_UIO() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList">UIOSelector_Get_UIOActivityList() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo">UIOSelector_Get_UIOInfo() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">UIOSelector_Get_UIOList() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">[1]</a>
</li> </li>
</ul></td> </ul></td>
<td style="width: 33%; vertical-align: top;"><ul> <td style="width: 33%; vertical-align: top;"><ul>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">UIOSelector_Get_UIOList() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList">UIOSelector_GetChildList_UIOList() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight">UIOSelector_Highlight() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">UIOSelector_SafeOtherGet_Process() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">UIOSelector_SafeOtherGet_Process() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO">UIOSelector_SearchChildByMouse_UIO() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO">UIOSelector_SearchChildByMouse_UIO() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree">UIOSelector_SearchChildByMouse_UIOTree() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree">UIOSelector_SearchChildByMouse_UIOTree() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict">UIOSelector_TryRestore_Dict() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool">UIOSelectorSecs_WaitAppear_Bool() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool">UIOSelectorSecs_WaitAppear_Bool() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool">[1]</a>
</li> </li>
@ -377,6 +389,8 @@
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">UIOSelectorsSecs_WaitAppear_List() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">UIOSelectorsSecs_WaitAppear_List() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List">[1]</a>
</li> </li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List">UIOSelectorsSecs_WaitDisappear_List() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List">[1]</a> <li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List">UIOSelectorsSecs_WaitDisappear_List() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List">[1]</a>
</li>
<li><a href="Robot/01_Robot.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict">UIOSelectorUIOActivity_Run_Dict() (in module pyOpenRPA.Robot.UIDesktop)</a>, <a href="Robot/02_Defs.html#pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict">[1]</a>
</li> </li>
</ul></td> </ul></td>
</tr></table> </tr></table>

@ -287,16 +287,16 @@ in QUEUE</p>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="Robot/02_Defs.html">2. Defs</a><ul> <li class="toctree-l1"><a class="reference internal" href="Robot/02_Defs.html">2. Defs</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Robot/02_Defs.html#pyopenrpa-robot-uidesktop">pyOpenRPA.Robot.UIDesktop</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/02_Defs.html#desktop-app-ui-access-win32-and-ui-automation-dlls">Desktop app UI access (win32 and UI automation dlls)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Robot/02_Defs.html#references">References</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/02_Defs.html#references">References</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="Robot/03_HowToUse.html">3. How to use</a><ul> <li class="toctree-l1"><a class="reference internal" href="Robot/03_HowToUse.html">3. How to use</a><ul>
<li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#content">Content</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#how-to-execute-rpa-script">How to execute RPA script</a></li>
<li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#about">About</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#theory-practice-desktop-app-ui-access-win32-and-ui-automation-dlls">Theory &amp; practice. Desktop app UI access (win32 and UI automation dlls)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#way-to-use">Way to use</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#theory-practice-web-app-ui-access-selenium">Theory &amp; practice. WEB app UI access (selenium)</a></li>
<li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#execute-python-script">Execute python script</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#theory-practice-keyboard-mouse-manipulation">Theory &amp; practice. Keyboard &amp; mouse manipulation</a></li>
<li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#use-in-studio-script-n-a">Use in studio script (n/a)</a></li> <li class="toctree-l2"><a class="reference internal" href="Robot/03_HowToUse.html#theory-practice-screen-capture-image-recognition">Theory &amp; practice. Screen capture &amp; image recognition</a></li>
</ul> </ul>
</li> </li>
<li class="toctree-l1"><a class="reference internal" href="Robot/04_Dependencies.html">4. Dependencies</a></li> <li class="toctree-l1"><a class="reference internal" href="Robot/04_Dependencies.html">4. Dependencies</a></li>

Binary file not shown.

File diff suppressed because one or more lines are too long

@ -17,11 +17,14 @@ Thank you!
* Skype: MegaFinder * Skype: MegaFinder
* Facebook: [https://www.facebook.com/RU.Ivan.Maslov](https://www.facebook.com/RU.Ivan.Maslov) * Facebook: [https://www.facebook.com/RU.IT4Business](https://www.facebook.com/RU.IT4Business)
* LinkedIn: [https://www.linkedin.com/in/RU-IvanMaslov/](https://www.linkedin.com/in/RU-IvanMaslov/) * LinkedIn: [https://www.linkedin.com/in/RU-IvanMaslov/](https://www.linkedin.com/in/RU-IvanMaslov/)
* WhatsApp | Telegram: +7 906 722 39 25
## 3-rd party components license dependencies ## 3-rd party components license dependencies

@ -89,6 +89,31 @@ Wait for UI object will disappear in GUI for inWaitSecs seconds.
### pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=None, inkwArgumentObject=None)
Run the activity in UIO (UI Object)
* **Parameters**
* **inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **inActionName** UIOActivity (name) activity name string from Pywinauto
* **inArgumentList**
* **inkwArgumentObject**
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector)
Check if object is exist by the UIO selector. Check if object is exist by the UIO selector.
@ -105,6 +130,40 @@ Check if object is exist by the UIO selector.
### pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight(inUIOSelector)
Set focus and highlight (draw outline) the element (in app) by the UIO selector.
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList(inUIOSelector=None, inBackend='win32')
Get list of child UIOs by the parent UIOSelector
* **Parameters**
* **inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **inBackend** “win32” or “uia”
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList)
Detect process bitness by the UI Object UIO Selector. Detect process bitness by the UI Object UIO Selector.
@ -159,6 +218,36 @@ Get the pywinauto object by the UIO selector.
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList(inUIOSelector)
Get the list of the UI object activities
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo(inUIOSelector)
Get the UIO dict of the attributes
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True)
Get the UIO list by the selector Get the UIO list by the selector
@ -181,6 +270,21 @@ Get the UIO list by the selector
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight(inUIOSelector)
Highlight (draw outline) the element (in app) by the UIO selector.
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector)
Safe get other process or None if destination app is the other/same bitness Safe get other process or None if destination app is the other/same bitness
@ -231,6 +335,21 @@ UIOSelector (see description on the top of the document)
### pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict(inSpecificationList)
Try to restore (maximize) window, if its minimized. (!IMPORTANT! When use UIA framework minimized windows doesnt appear by the UIOSelector. You need to try restore windows and after that try to get UIO)
* **Parameters**
**inSpecificationList** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False) ### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)
Wait for many UI object will appear in GUI for inWaitSecs seconds. Wait for many UI object will appear in GUI for inWaitSecs seconds.

@ -1,6 +1,142 @@
# 2. Defs # 2. Defs
## pyOpenRPA.Robot.UIDesktop ## Desktop app UI access (win32 and UI automation dlls)
### Definitions
* **UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]
* **UIOSelector** - List of dict (key attributes)
* **PWA** - PyWinAuto
* **PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)
* **UIOTree** - Recursive Dict of Dict … (UI Parent -> Child hierarchy)
* **UIOInfo** - Dict of UIO attributes
* **UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module
* **UIOEI** - UI Object info object
### 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](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 :) ).
``` ```
# EXAMPLE 1 # EXAMPLE 1
@ -39,11 +175,26 @@ UIDesktop.UIOSelector_Get_UIO(
| Wait for UI object will disappear in GUI for inWaitSecs seconds. | Wait for UI object will disappear in GUI for inWaitSecs seconds.
|
| `UIOSelectorUIOActivity_Run_Dict`(…[, …])
| Run the activity in UIO (UI Object)
| |
| `UIOSelector_Exist_Bool`(inUIOSelector) | `UIOSelector_Exist_Bool`(inUIOSelector)
| Check if object is exist by the UIO selector. | Check if object is exist by the UIO selector.
|
| `UIOSelector_FocusHighlight`(inUIOSelector)
| Set focus and highlight (draw outline) the element (in app) by the UIO selector.
|
| `UIOSelector_GetChildList_UIOList`([…])
| Get list of child UIOs by the parent UIOSelector
| |
| `UIOSelector_Get_BitnessInt`(inSpecificationList) | `UIOSelector_Get_BitnessInt`(inSpecificationList)
@ -59,11 +210,26 @@ UIDesktop.UIOSelector_Get_UIO(
| Get the pywinauto object by the UIO selector. | Get the pywinauto object by the UIO selector.
|
| `UIOSelector_Get_UIOActivityList`(inUIOSelector)
| Get the list of the UI object activities
|
| `UIOSelector_Get_UIOInfo`(inUIOSelector)
| Get the UIO dict of the attributes
| |
| `UIOSelector_Get_UIOList`(inSpecificationList) | `UIOSelector_Get_UIOList`(inSpecificationList)
| Get the UIO list by the selector | Get the UIO list by the selector
|
| `UIOSelector_Highlight`(inUIOSelector)
| Highlight (draw outline) the element (in app) by the UIO selector.
| |
| `UIOSelector_SafeOtherGet_Process`(inUIOSelector) | `UIOSelector_SafeOtherGet_Process`(inUIOSelector)
@ -79,6 +245,11 @@ UIDesktop.UIOSelector_Get_UIO(
| !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!! | !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
|
| `UIOSelector_TryRestore_Dict`(inSpecificationList)
| Try to restore (maximize) window, if its minimized.
| |
| `UIOSelectorsSecs_WaitAppear_List`(…[, …]) | `UIOSelectorsSecs_WaitAppear_List`(…[, …])
@ -175,6 +346,31 @@ Wait for UI object will disappear in GUI for inWaitSecs seconds.
### pyOpenRPA.Robot.UIDesktop.UIOSelectorUIOActivity_Run_Dict(inUIOSelector, inActionName, inArgumentList=None, inkwArgumentObject=None)
Run the activity in UIO (UI Object)
* **Parameters**
* **inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **inActionName** UIOActivity (name) activity name string from Pywinauto
* **inArgumentList**
* **inkwArgumentObject**
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector)
Check if object is exist by the UIO selector. Check if object is exist by the UIO selector.
@ -191,6 +387,40 @@ Check if object is exist by the UIO selector.
### pyOpenRPA.Robot.UIDesktop.UIOSelector_FocusHighlight(inUIOSelector)
Set focus and highlight (draw outline) the element (in app) by the UIO selector.
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_GetChildList_UIOList(inUIOSelector=None, inBackend='win32')
Get list of child UIOs by the parent UIOSelector
* **Parameters**
* **inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **inBackend** “win32” or “uia”
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList)
Detect process bitness by the UI Object UIO Selector. Detect process bitness by the UI Object UIO Selector.
@ -245,6 +475,36 @@ Get the pywinauto object by the UIO selector.
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOActivityList(inUIOSelector)
Get the list of the UI object activities
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOInfo(inUIOSelector)
Get the UIO dict of the attributes
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True)
Get the UIO list by the selector Get the UIO list by the selector
@ -267,6 +527,21 @@ Get the UIO list by the selector
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Highlight(inUIOSelector)
Highlight (draw outline) the element (in app) by the UIO selector.
* **Parameters**
**inUIOSelector** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector) ### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector)
Safe get other process or None if destination app is the other/same bitness Safe get other process or None if destination app is the other/same bitness
@ -317,6 +592,21 @@ UIOSelector (see description on the top of the document)
### pyOpenRPA.Robot.UIDesktop.UIOSelector_TryRestore_Dict(inSpecificationList)
Try to restore (maximize) window, if its minimized. (!IMPORTANT! When use UIA framework minimized windows doesnt appear by the UIOSelector. You need to try restore windows and after that try to get UIO)
* **Parameters**
**inSpecificationList** UIOSelector - List of items, which contains condition attributes
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False) ### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)
Wait for many UI object will appear in GUI for inWaitSecs seconds. Wait for many UI object will appear in GUI for inWaitSecs seconds.

@ -1,24 +1,8 @@
# 3. How to use # 3. How to use
## Content
* [About](#about)
* [How to use](#way-to-use)
* [Create python script](#create-python-script)
* [Execute python script](#execute-python-script)
## About
The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA. The Robot tool is the main module for production process automation. It has no graphic/console interface. All low-level actions to OS are perfoming by the Robot tool in OpenRPA.
## Way to use ## How to execute RPA script
You can use the robot by the several ways: You can use the robot by the several ways:
@ -42,7 +26,7 @@ import cv2 # [Computer vision](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.4
import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br> import keyboard #[Keyboard manipulation](https://gitlab.com/UnicodeLabs/OpenRPA/wikis/05.3.-Theory-&-practice:-Keyboard-&-mouse-manipulation)<br>
``` ```
## Execute python script ### Execute python script
The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways: The OpenRPA is fully portable solution. It contains own python enviroment both 32 and 64 bit versions. So, you can execute your python script in several ways:
- Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2) - Execute in python x32 (OpenRPAResourcesWPy32-3720python-3.7.2)
@ -78,7 +62,7 @@ copy /Y ..\Resources\WPy32-3720\python-3.7.2\python.exe ..\Resources\WPy32-3720\
pause >nul pause >nul
``` ```
## Use in studio script (n/a) ### Use in studio script (n/a)
``` ```
import sys import sys
@ -88,13 +72,178 @@ import keyboard
import subprocess import subprocess
import time import time
#Highlight the UI Object in Folder explorer<br> #Highlight the UI Object in Folder explorer
GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])<br> GUI.UIOSelector_FocusHighlight([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}])
#Wait 2 seconds<br> #Wait 2 seconds
time.sleep(3)<br> time.sleep(3)
#Loop: get child element of UI List<br> #Loop: get child element of UI List
for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():<br> for lItem in GUI.UIOSelector_Get_UIO([{"class_name":"CabinetWClass","backend":"uia"},{"ctrl_index":2},{"ctrl_index":0},{"ctrl_index":2},{"ctrl_index":0}]).children():
&nbsp; &nbsp; &nbsp; &nbsp; print(str(lItem)) print(str(lItem))
``` ```
Here you can find the docs and examples of the OpenRPA desktop (GUI) app access.
## Theory & practice. Desktop app UI access (win32 and UI automation dlls)
### Definitions
**UIO** - UI Object (class of pywinauto UI object) [pywinauto.base_wrapper]<br>
**UIOSelector** - List of dict (key attributes)<br>
**PWA** - PyWinAuto<br>
**PWASpecification** - List of dict (key attributes in pywinauto.find_window notation)<br>
**UIOTree** - Recursive Dict of Dict … (UI Parent -> Child hierarchy)<br>
**UIOInfo** - Dict of UIO attributes<br>
**UIOActivity** - Activity of the UIO (UI object) from the Pywinauto module<br>
**UIOEI** - UI Object info object
### 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](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**
```
``
```
```
`
```
[
{
“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 :) ).
```
*
```
Naming convention: <InArgument>_<ActivityName>_<OutArgument - if exist>\*<br>
## Theory & practice. WEB app UI access (selenium)
### About
The pyOpenRPA support web app manipulation (by the Selenium lib).
More docs about selenium you can find here ([https://selenium-python.readthedocs.io/](https://selenium-python.readthedocs.io/))
### How to use
To start use selenium just import selenium modules in the robot tool. Here is the example of the usage.
```
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
```
## Theory & practice. Keyboard & mouse manipulation
## Theory & practice. Screen capture & image recognition
### How to automate image recognition on PC
Here you can find any ways you need to use in your business case:
- Find the exact match on the screen with the other image
- Use text recognition module (OCR)
- Use computer vision (CV) to identify the objects on screen/image/video
- Use artificial intelligence (AI) to make custom identification/classification/text recognition

@ -166,7 +166,7 @@ in QUEUE
* 2. Defs * 2. Defs
* pyOpenRPA.Robot.UIDesktop * Desktop app UI access (win32 and UI automation dlls)
* References * References
@ -175,19 +175,19 @@ in QUEUE
* 3. How to use * 3. How to use
* Content * How to execute RPA script
* About * Theory & practice. Desktop app UI access (win32 and UI automation dlls)
* Way to use * Theory & practice. WEB app UI access (selenium)
* Execute python script * Theory & practice. Keyboard & mouse manipulation
* Use in studio script (n/a) * Theory & practice. Screen capture & image recognition
* 4. Dependencies * 4. Dependencies

Loading…
Cancel
Save