You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ORPA-pyOpenRPA/Wiki/ENG_Guide/markdown/Robot/02_Defs.md

387 lines
11 KiB

# 2. Defs
## pyOpenRPA.Robot.UIDesktop
```
# EXAMPLE 1
from pyOpenRPA.Robot import UIDesktop
UIDesktop.UIOSelector_Get_UIO(
inSpecificationList=[
{"title":"notepad.exe"},{"title":"OK"}],
inElement=None,
inFlagRaiseException=True)
```
**Functions:**
| `Get_OSBitnessInt`()
| Detect OS bitness.
|
| `PWASpecification_Get_PWAApplication`(…)
| #Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element
|
| `PWASpecification_Get_UIO`(…)
| #Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element #old name - GetControl
|
| `UIOSelectorSecs_WaitAppear_Bool`(…)
| Wait for UI object will appear in GUI for inWaitSecs seconds.
|
| `UIOSelectorSecs_WaitDisappear_Bool`(…)
| Wait for UI object will disappear in GUI for inWaitSecs seconds.
|
| `UIOSelector_Exist_Bool`(inUIOSelector)
| Check if object is exist by the UIO selector.
|
| `UIOSelector_Get_BitnessInt`(inSpecificationList)
| Detect process bitness by the UI Object UIO Selector.
|
| `UIOSelector_Get_BitnessStr`(inSpecificationList)
| Detect process bitness by the UI Object UIO Selector.
|
| `UIOSelector_Get_UIO`(inSpecificationList[, …])
| Get the pywinauto object by the UIO selector.
|
| `UIOSelector_Get_UIOList`(inSpecificationList)
| Get the UIO list by the selector
|
| `UIOSelector_SafeOtherGet_Process`(inUIOSelector)
| Safe get other process or None if destination app is the other/same bitness
|
| `UIOSelector_SearchChildByMouse_UIO`(…)
| UIOSelector (see description on the top of the document) #old name - AutomationSearchMouseElement
|
| `UIOSelector_SearchChildByMouse_UIOTree`(…)
| !!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
|
| `UIOSelectorsSecs_WaitAppear_List`(…[, …])
| Wait for many UI object will appear in GUI for inWaitSecs seconds.
|
| `UIOSelectorsSecs_WaitDisappear_List`(…[, …])
| Wait for many UI object will disappear in GUI for inWaitSecs seconds.
|
### pyOpenRPA.Robot.UIDesktop.Get_OSBitnessInt()
Detect OS bitness.
* **Returns**
int 32 or int 64
### pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_PWAApplication(inControlSpecificationArray)
#Backend selection - attribute “backend” (“win32” || “uia”) in 1-st list element
* **Parameters**
**inControlSpecificationArray** List of dict, dict in pywinauto.find_windows notation
* **Returns**
process application object
### pyOpenRPA.Robot.UIDesktop.PWASpecification_Get_UIO(inControlSpecificationArray)
#Backend def selection - attribute “backend” (“win32” || “uia”) in 1-st list element
#old name - GetControl
* **Parameters**
**inControlSpecificationArray** List of dict, dict in pywinauto.find_windows notation
* **Returns**
list of UIO object
### pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitAppear_Bool(inSpecificationList, inWaitSecs)
Wait for UI object will appear in GUI for inWaitSecs seconds.
* **Parameters**
* **inSpecificationList** UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]
* **inWaitSecs** Float value (seconds) for wait UI element appear in GUI
* **Returns**
True - UI object will appear. False - else case
### pyOpenRPA.Robot.UIDesktop.UIOSelectorSecs_WaitDisappear_Bool(inSpecificationList, inWaitSecs)
Wait for UI object will disappear in GUI for inWaitSecs seconds.
* **Parameters**
* **inSpecificationList** UIOSelector.
Example: [{“title”:”notepad”},{“title”:”OK”}]
* **inWaitSecs** Float value (seconds) for wait UI element disappear in GUI
* **Returns**
True - UI object will disappear. False - else case
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Exist_Bool(inUIOSelector)
Check if object is exist by the UIO selector.
* **Parameters**
**inUIOSelector**
* **Returns**
True - Object is exist. False - else case
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessInt(inSpecificationList)
Detect process bitness by the UI Object UIO Selector.
* **Parameters**
**inSpecificationList** UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]
* **Returns**
int 32 or int 64
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_BitnessStr(inSpecificationList)
Detect process bitness by the UI Object UIO Selector.
* **Parameters**
**inSpecificationList** UIOSelector. Example: [{“title”:”notepad”},{“title”:”OK”}]
* **Returns**
str “32” or str “64”
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIO(inSpecificationList, inElement=None, inFlagRaiseException=True)
Get the pywinauto object by the UIO selector.
* **Parameters**
* **inSpecificationList**
* **inElement**
* **inFlagRaiseException**
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_Get_UIOList(inSpecificationList, inElement=None, inFlagRaiseException=True)
Get the UIO list by the selector
* **Parameters**
* **inSpecificationList** UIO Selector
* **inElement** Входной элемент - показатель, что не требуется выполнять коннект к процессу
* **inFlagRaiseException** Флаг True - выкинуть ошибку в случае обнаружении пустого списка
* **Returns**
### pyOpenRPA.Robot.UIDesktop.UIOSelector_SafeOtherGet_Process(inUIOSelector)
Safe get other process or None if destination app is the other/same bitness
* **Parameters**
**inUIOSelector** UIO Selector of the UI object
* **Returns**
None or process (of the other bitness)
### pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIO(inElementSpecification)
UIOSelector (see description on the top of the document)
#old name - AutomationSearchMouseElement
* **Parameters**
**inElementSpecification** UIOSelector of the UI Object
* **Returns**
pywinauto element wrapper instance or None
### pyOpenRPA.Robot.UIDesktop.UIOSelector_SearchChildByMouse_UIOTree(inUIOSelector)
!!!!Safe call is included (you can set activity and UIDesktop will choose the bitness and return the result)!!!!!
* **Parameters**
**inUIOSelector** UIOSelector of the UI Object
* **Returns**
?
### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitAppear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)
Wait for many UI object will appear in GUI for inWaitSecs seconds.
* **Parameters**
* **inSpecificationListList** UIOSelector list.
Example: [
> [{“title”:”notepad”},{“title”:”OK”}],
> [{“title”:”notepad”},{“title”:”Cancel”}]
]
* **inWaitSecs** Float value (seconds) for wait UI element appear in GUI
* **inFlagWaitAllInMoment** True - Wait all UI objects from the UIOSelector list to be appeared
* **Returns**
List of index, which UI object UIO will be appeared. Example: [1] # Appear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}]
### pyOpenRPA.Robot.UIDesktop.UIOSelectorsSecs_WaitDisappear_List(inSpecificationListList, inWaitSecs, inFlagWaitAllInMoment=False)
Wait for many UI object will disappear in GUI for inWaitSecs seconds.
* **Parameters**
* **inSpecificationListList** UIOSelector list.
Example: [
> [{“title”:”notepad”},{“title”:”OK”}],
> [{“title”:”notepad”},{“title”:”Cancel”}]
]
* **inWaitSecs** Float value (seconds) for wait UI element disappear in GUI
* **inFlagWaitAllInMoment** True - Wait all UI objects from the UIOSelector list to be disappeared.
* **Returns**
List of index, which UI object UIO will be disappeared. Example: [1] # Disappear only UI object with UIO selector: [{“title”:”notepad”},{“title”:”Cancel”}]
* **Returns**
## References
[reStructuredText](http://docutils.sourceforge.net/rst.html)