Skip to content

Introduce maybeTap to platform #2889

@zoskar

Description

@zoskar

Use case

INB4 "It's anti-pattern"

Sometimes, most likely when working with native views, some element of the flow might not be displayed. Examples:

  • Onboarding of the app when running patrol develop, if I did not manage to clean app state when opening app in test
  • Some native popups might differ between Android versions
  • many more, e2e tests can be brutal

Usually this block is enough:

    try {
      await $.platform.android.tap(AndroidSelector(text: 'Done'));
    } catch (_) {
      /* ignore */
    }

... but I would expect Patrol to allow me to continue with the test even if the element won't be tapped

Proposal

No proposal yet, I'd imagine it's the same logic as platform.mobile.tap without throwing exception in case of failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature requestpackage: patrolRelated to the patrol package (native automation, test bundling)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions