poco.drivers.windows.windowsui_poco module
- class WindowsPoco(selector=None, addr=('localhost', 15004), **options)[源代码]
基类:
StdPoco
Poco WindowsUI implementation.
- 参数:
selector (
dict
) –find window by a selector, optional parameters:
title
,handle
,title_re
title: find windows by titlehandle: find windows by handle
title_re: find windows by regular expression of title
addr (
tuple
) – where the WindowsUI running on, (localhost,15004) by defaultoptions – see
poco.pocofw.Poco
示例
- If your programme is running, you could initialize poco instance by using following snippet::
from poco.drivers.windows import WindowsPoco # poco = WindowsPoco({‘title’:’xxx’}) # poco = WindowsPoco({‘handle’:123456}) # poco = WindowsPoco({‘title_re’:’[a-z][a-z][a-z]’})
- scroll(direction='vertical', percent=1, duration=2.0)[源代码]
Scroll from the lower part to the upper part of the entire screen.
- 参数:
direction (
str
) – scrolling direction. “vertical” or “horizontal”percent (
float
) – scrolling distance percentage of the entire screen height or width according to directionduration (
float
) – time interval in which the action is performed