-
Notifications
You must be signed in to change notification settings - Fork 343
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
[Feature Request] Toggle Airplane Mode #1443
Comments
Looks like it's possible on Android through It'd be a bit problematic on iOS though, because Airplane Mode is only visible in Control Center on physical devices, which are currently unsupported (see #686). Once they are supported, toggling the airplane mode still (likely) wouldn't work through calling a command (like Once Control Center is opened, airplane mode could be enabled with: let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let toggle = springboard.switches["airplane-mode-button"]
if toggle.value! as! String == "0" {
toggle.tap()
} And to open Control Center: func openControlCenter() {
let springboard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
let start: CGVector
let end: CGVector
// for iPhone 8 (and older) and iPhone SEs
start = CGVector(dx: 0.5, dy: 0.99)
end = CGVector(dx: 0.5, dy: 0.8)
// for iPhones with notch
start = CGVector(dx: 0.9, dy: 0.01)
end = CGVector(dx: 0.9, dy: 0.2)
let startCoord = springboard.coordinate(withNormalizedOffset: start)
let endCoord = springboard.coordinate(withNormalizedOffset: end)
startCoord.press(forDuration: 0.1, thenDragTo: endCoord)
} |
@bartekpacia How would you run adb through maestro test/yaml file? |
I don't think it's possible now - I was just sketching out implementation idea. |
Support for configuring airplane mode on Android was implemented in #1672 And since there's no airplane mode on simulator, I'm going to close this issue. |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue. |
Is your feature request related to a problem? Please describe.
Our Apps have certain features that only work in airplane mode - like watching downloaded videos etc.
We need a way to toggle the airplane mode on iOS and Android
Describe the solution you'd like
Two simple commands would be great:
- turnAirplanemodeOn
- turnAirplanemodeOff
Describe alternatives you've considered
We tried to do this with the settings app and via control center but that solution is very flaky. Especially on different OS versions
The text was updated successfully, but these errors were encountered: