Enable wifi is not working on iPhone real device
Steps to reproduce
- Clone the sample patrol tests repo
- add 'native.enableWifi()' in the test
- Run the tests
Actual results
- Control center is being opened but driver not able to turn off the wifi
Logs
Logs
2025-01-23 17:38:18.057002+1030 RunnerUITests-Runner[] PatrolServer: INFO: enabling wifi...
t = 27.23s Press Application 'com.apple.springboard'[0.90, 0.01] for 0.1 seconds, then drag to Application 'com.apple.springboard'[0.90, 0.20] with velocity of 500.00 pixels per second, and then hold for 0.0 seconds
t = 27.23s Wait for com.apple.springboard to idle
t = 27.24s Find the Application 'com.apple.springboard'
t = 27.29s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.30s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.31s Check for interrupting elements affecting " " Application
t = 27.32s Wait for au.com.youi.clientdev to idle
t = 27.34s Synthesize event
t = 27.34s Find the Application 'com.apple.springboard'
t = 27.39s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.40s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.42s Find the Application 'com.apple.springboard'
t = 27.44s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.44s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.44s Find the Application 'com.apple.springboard'
t = 27.46s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.46s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.46s Find the Application 'com.apple.springboard'
t = 27.48s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.48s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.49s Find the Application 'com.apple.springboard'
t = 27.50s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 27.50s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 28.16s Wait for com.apple.springboard to idle
t = 28.17s Waiting 10.0s for "wifi-button" Switch to exist
t = 29.20s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 29.20s Checking existence of `"wifi-button" Switch`
t = 29.30s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 29.31s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 29.31s Capturing element debug description
t = 30.23s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 30.23s Checking existence of `"wifi-button" Switch`
t = 30.35s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 30.36s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 30.36s Capturing element debug description
t = 31.18s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 31.18s Checking existence of `"wifi-button" Switch`
t = 31.29s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 31.30s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 31.30s Capturing element debug description
t = 32.23s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 32.23s Checking existence of `"wifi-button" Switch`
t = 32.35s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 32.36s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 32.36s Capturing element debug description
t = 33.19s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 33.19s Checking existence of `"wifi-button" Switch`
t = 33.30s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 33.31s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 33.32s Capturing element debug description
t = 34.24s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 34.24s Checking existence of `"wifi-button" Switch`
t = 34.36s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 34.36s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 34.37s Capturing element debug description
t = 35.19s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 35.20s Checking existence of `"wifi-button" Switch`
t = 35.30s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 35.31s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 35.32s Capturing element debug description
t = 36.25s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 36.26s Checking existence of `"wifi-button" Switch`
t = 36.37s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 36.37s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 36.38s Capturing element debug description
t = 37.20s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 37.20s Checking existence of `"wifi-button" Switch`
t = 37.31s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 37.32s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 37.32s Capturing element debug description
t = 38.17s Checking `Expect predicate `existsNoRetry == 1` for object "wifi-button" Switch`
t = 38.17s Checking existence of `"wifi-button" Switch`
t = 38.28s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 38.29s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 38.30s Capturing element debug description
t = 38.30s Checking existence of `"wifi-button" Switch`
t = 38.36s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 38.37s Ignoring failure to get hierarchy for remote element in process 32635 (Error getting main window kAXErrorServerNotFound)
t = 38.37s Collecting debug information to assist test failure triage
t = 38.37s Requesting snapshot of accessibility hierarchy for app with pid 36
2025-01-23 17:38:29.375983+1030 RunnerUITests-Runner[] PatrolServer: ERROR: wifi-button doesn't exist
Patrol version
patrol: v3.14.0 patrol_cli: v3.5.0
Patrol Doctor output
Patrol Doctor output
Patrol doctor:
Patrol CLI version: 3.5.0
Flutter command: fvm flutter
Flutter 3.24.0 • channel stable
Android:
• Program adb found in /Users/m999/Library/Android/Sdk/platform-tools/adb
• Env var $ANDROID_HOME set to /Users/m999/Library/Android/Sdk
iOS / macOS:
• Program xcodebuild found in /usr/bin/xcodebuild
• Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller
Flutter Doctor output
Flutter Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.0, on macOS 15.2 24C101 darwin-arm64, locale en-AU)
[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0-rc3)
[✓] Xcode - develop for iOS and macOS (Xcode 16.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] VS Code (version 1.96.4)
[✓] Connected device (6 available)
[✓] Network resources
• No issues found!
@manojkumar-bandlamudi can you add on which iPhone you were testing and what system is there?
Hi @pdenert , I am testing on iPhone 14 with OS 18.2.1
I'm also having this error. Using iPhone 12 iOS 18.3.2
Should be fixed in 3.20/3.11 patrol & cli
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.