Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add methods to enable and disable Airplane Mode on Android #1359

Open
bartekpacia opened this issue Jun 15, 2023 · 0 comments
Open

Add methods to enable and disable Airplane Mode on Android #1359

bartekpacia opened this issue Jun 15, 2023 · 0 comments
Labels
feature New feature request package: patrol Related to the patrol package (native automation, test bundling) platform: android Android is affected

Comments

@bartekpacia
Copy link
Contributor

bartekpacia commented Jun 15, 2023

This is already achievable by $.native.tap(), but is a bit, lengthy, and device-dependent.

We'd like to have a more high-level API (like we already have for Wi-Fi, Cellular, and Dark Mode).

We want to get from this:

void main() {
  patrolTest(
    'toggles location',
    nativeAutomation: true,
    ($) async {
      await $.native.openQuickSettings();
      await $.native.tap(const Selector(text: 'Airplane Mode'));
      await $.native.tap(const Selector(text: 'Airplane Mode'));
      await $.native.pressBack();
    },
  );
}

to this:

void main() {
  patrolTest(
    'toggles location',
    nativeAutomation: true,
    ($) async {
      await $.native.enableAirplaneMode();
      await $.native.disableAirplaneMode();
    },
  );
}

Siblings of this issue

@bartekpacia bartekpacia added feature New feature request package: patrol Related to the patrol package (native automation, test bundling) platform: android Android is affected labels Jun 15, 2023
@jBorkowska jBorkowska assigned jBorkowska and unassigned jBorkowska Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request package: patrol Related to the patrol package (native automation, test bundling) platform: android Android is affected
Projects
None yet
Development

No branches or pull requests

2 participants