Additional Actions

ScreenPy Appium adds many additional Actions. For the base Action list, see ScreenPy’s Actions API reference.

Clear

class Clear(target: Target)

Clear the text from an input field.

Abilities Required:

UseAnAndroidDevice UseAnIOSDevice

Examples:

the_actor.attempts_to(Clear.the_text_from_the(NAME_INPUT))
static the_text_from_the(target: Target) Clear

Specify the Target from which to clear the text.

static the_text_from(target: Target) Clear

Specify the Target from which to clear the text.

static the_text_from_the_first_of_the(target: Target) Clear

Specify the Target from which to clear the text.

Enter

class Enter(text: str, mask: bool = False)

Enter text into an input field, or press specific keys.

Abilities Required:

UseAnAndroidDevice UseAnIOSDevice

Examples:

the_actor.attempts_to(
    Enter.the_text("Hello world!").into_the(COMMENT_FIELD)
)
static the_text(text: str) Enter

Provide the text to enter into the field.

static the_keys(text: str) Enter

Provide the text to enter into the field.

static the_secret(text: str) Enter

Provide the text to enter into the field, but mask it in logging.

The text will appear as “[CENSORED]”.

static the_password(text: str) Enter

Provide the text to enter into the field, but mask it in logging.

The text will appear as “[CENSORED]”.

into_the(target: Target) Enter

Target the element to enter text into.

on(target: Target) Enter

Target the element to enter text into.

into(target: Target) Enter

Target the element to enter text into.

into_the_first_of_the(target: Target) Enter

Target the element to enter text into.

Tap

class Tap(target: Target)

Tap on an element!

Abilities Required:

UseAnAndroidDevice UseAnIOSDevice

Examples:

the_actor.attempts_to(Tap.on_the(HAMBURGER_MENU))

the_actor.attempts_to(Tap.on(THE_BACK_BUTTON))

the_actor.attempts_to(Tap.on_the_first_of_the(SEARCH_RESULTS))
static on_the(target: Target) Tap

Target the element to tap on.

static on(target: Target) Tap

Target the element to tap on.

static on_the_first_of_the(target: Target) Tap

Target the element to tap on.