Cross platform UI Automation Python Library
pip install uimap
- Create UI Map.
- Load UI Map and access UI elements by names.
-
Create UI Map: c:\itunes.yml
--- __driver: wpf WND_ITUNES: __char: __scope: child Name: iTunes ClassName: iTunes ControlType: Window LCD: __char: __scope: child Name: LCD 部分 ControlType: Text LCD_DOWNLOADING: lbl正在下载* LCD_ACCESSING: lbl正在访问* LCD_PAYING: lbl正在购买* LCD_BTN_CANCEL: btn停止 NAV_BAR: __char: __scope: child Name: "" ControlType: Button LNK_HOME: __char: __scope: child Name: iTunes Store 主页 ControlType: Button
-
Load and access
from uimap import UiMap ui = UiMap(r'c:\itunes.yml') if ui.WND_ITUNES.exist(): print 'iTunes window is open.' else: print 'iTunes window is not found.'
A cross-platform opensource automation testing tool.
Homepage: http://ldtp.freedesktop.org/wiki/
To use ldtp driver, create UI map with
__driver: ldtp
and describe UI elements with LDTP naming convention.
UI Automation Library provided by Microsoft with .NET Library.
Homepage: http://msdn.microsoft.com/en-us/library/ms747327.aspx
To use wpf driver, create UI map with
__driver: wpf
and describe UI elements by properties of AutomationElement.
.NET 4.0 and IronPython required.
Simulate user click on UI element.
Determine whether the UI element exists.
Simulate key strokes to UI element.
Example:
ui.TXT_USERNAME.sendkeys('my_name<enter>')
If the specified UI element is a window, bring it to the front, otherwise set focus to it.
Example:
ui.WND_ITUNES.activate()
Maximize the specified window.
Get the value of the UI element.
Example:
print 'the username is', ui.TXT_USERNAME.value()
Set the value of the UI element.
Example:
ui.TXT_USERNAME.set_value('my_name')
Close the specified window.