Loading...
Searching...
No Matches
lomiri.greeter.Greeter Class Reference

## Public Member Functions

| wait_swiped_away (self)
| swipe (self)
| get_prompt (self)

## Public Attributes

| required

## Detailed Description

    A helper that understands the greeter screen.

Definition at line 61 of file __init__.py.

## Member Function Documentation

## get_prompt()

lomiri.greeter.Greeter.get_prompt | ( |  | self | ) |

Definition at line 95 of file __init__.py.

def get_prompt(self):
return self.select_single(
lomiriuitoolkit.TextField, objectName='promptField')

## swipe()

lomiri.greeter.Greeter.swipe | ( |  | self | ) |

    Swipe the greeter screen away.

Definition at line 80 of file __init__.py.

def swipe(self):
"""Swipe the greeter screen away."""
self.waiting.wait_for(False)
coverPage = self.select_single(objectName='coverPage')
coverPage.showProgress.wait_for(1)
rect = self.globalRect
start_x = rect[0] + rect[2] - 3
start_y = int(rect[1] + rect[3] / 2)
stop_x = int(rect[0] + rect[2] * 0.2)
stop_y = start_y
self.pointing_device.drag(start_x, start_y, stop_x, stop_y)
self.wait_swiped_away()

## wait_swiped_away()

lomiri.greeter.Greeter.wait_swiped_away | ( |  | self | ) |

Definition at line 64 of file __init__.py.

def wait_swiped_away(self):
# We have to be careful here, because coverPage can go away at any time
# if there isn't a lockscreen behind it (it hides completely, then
# the greeter disposes it). But if there *is* a lockscreen, then we
# need a different check, by looking at its showProgress. So make our
# own wait_for loop and check both possibilities.
for i in range(10):
if not self.required:
return
coverPage = self.select_single(objectName='coverPage')
if coverPage.showProgress == 0:
return
sleep(1)
raise AssertionError("Greeter cover page still up after 10s")

## Member Data Documentation

## required

lomiri.greeter.Greeter.required

Definition at line 71 of file __init__.py.

The documentation for this class was generated from the following file:

- tests/autopilot/lomiri/greeter/__init__.py