qt4c.uiacontrols

使用UIA方式去访问控件

Module Contents

Classes

Control UIA方式访问控件基类
UIAWindows UIA控件窗体定义
Edit UIA方式访问控件基类
ComboBox UIA方式访问控件基类
RadioButton UIA方式访问控件基类

Functions

find_UIAElm(Condition, timeout=10)
qt4c.uiacontrols.IUIAutomation
qt4c.uiacontrols.UIAutomationClient
qt4c.uiacontrols.RawWalker
qt4c.uiacontrols.ControlWalker
qt4c.uiacontrols.UIAControlType
qt4c.uiacontrols.find_UIAElm(Condition, timeout=10)
class qt4c.uiacontrols.Control(root=None, locator=None)

Bases: qt4c.control.Control

UIA方式访问控件基类

Valid

是否是有效控件

Width

控件宽度

Height

控件高度

BoundingRect

返回控件

ProcessId
ControlType

返回UIA控件的类型

Enabled

此控件是否可用

Children

返回子控件列表 :rtype ListType

Parent
Name

返回control的name属性

Type

返回控件类型

Value

返回控件value属性(通常是文本信息)

Hwnd

返回控件句柄

HWnd

兼容其他类型控件

hwnd
HasKeyboardFocus

返回是否被选为键盘输入

ClassName

返回ClassName

_init_uiaobj(self)

初始化uia对象

empty_invoke(self)

无意义调用,用于主动初始化对象

SetFocus(self)
_getrect(self)
click(self, mouseFlag=MouseFlag.LeftButton, clickType=MouseClickType.SingleClick, xOffset=None, yOffset=None)

点击控件 :type mouseFlag:qt4c.mouse.MouseFlag :param mouseFlag: 鼠标按钮类型 :type clickType:qt4c.mouse.MouseClickType :param clickType:点击动作类型 :type xOffset:int :param 横向偏移量 :type yOffset:int :param 纵向偏移量

equal(self, other)

判断两个对象是否相同。未实现!

参数:other (Control) – 本对象实例
exist(self)

判断控件是否存在

wait_for_exist(self, timeout, interval)

等待控件存在

class qt4c.uiacontrols.UIAWindows(root=None, locator=None)

Bases: qt4c.uiacontrols.Control, qt4c.control.ControlContainer

UIA控件窗体定义

Window

返回wincontrols.Window

Visible

窗口是否可见

Minimized

该窗口是否最小化

class qt4c.uiacontrols.Edit(root=None, locator=None)

Bases: qt4c.uiacontrols.Control

UIA方式访问控件基类

input(self, data)

对Edit类型控件进行输入 :type keys: utf-8 str or unicode :param keys: 键盘输入字符串,可输入组合键,如”{CTRL}{MENU}a”

class qt4c.uiacontrols.ComboBox(root=None, locator=None)

Bases: qt4c.uiacontrols.Control

UIA方式访问控件基类

Value

返回控件value属性(通常是文本信息)

input(self, data)

对Edit类型控件进行输入 :type keys: utf-8 str or unicode :param keys: 键盘输入字符串,可输入组合键,如”{CTRL}{MENU}a”

expand(self)
collapse(self)
class qt4c.uiacontrols.RadioButton(root=None, locator=None)

Bases: qt4c.uiacontrols.Control

UIA方式访问控件基类

is_select(self)