poco.drivers.windows.windowsui_poco module

class WindowsPoco(selector=None, addr=('localhost', 15004), **options)[source]

Bases: StdPoco

Poco WindowsUI implementation.

Parameters:
  • selector (dict) –

    find window by a selector, optional parameters: title, handle, title_re title: find windows by title

    handle: find windows by handle

    title_re: find windows by regular expression of title

  • addr (tuple) – where the WindowsUI running on, (localhost,15004) by default

  • options – see poco.pocofw.Poco

Examples

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)[source]

Scroll from the lower part to the upper part of the entire screen.

Parameters:
  • direction (str) – scrolling direction. “vertical” or “horizontal”

  • percent (float) – scrolling distance percentage of the entire screen height or width according to direction

  • duration (float) – time interval in which the action is performed