calabash / calabash-ios

Calabash for iOS
Other
1.81k stars 369 forks source link

German springboard alert for Camera permission is not dismissed #1344

Closed patrick-silvera closed 6 years ago

patrick-silvera commented 7 years ago

The following springboard alert is not dismissed automatically:

"My App" möchte auf deine Kamera zugreifen
Nicht erlauben             OK

The english version of this alert works:

"My App" Would Like to Access the Camera
Don't Allow                OK

Maybe related to https://github.com/calabash/calabash-ios/issues/1219

macOS 10.12.6 Xcode 9.0 calabash-cucumber 0.21.1 run-loop 2.6.1

Tested on iPhone 8 Plus (iOS 11.0)

jmoody commented 7 years ago

Thanks for reporting.

The fix will be available in the next release of DeviceAgent.

FYI, the < iOS 11 alert is:

"Ja", "möchte auf Ihre Kamera zugreifen"

Until the release, you can manually handle this alert using something like this:

...
# Turn off automatic alert dismissal
device_agent.dismiss_springboard_alerts_manually!

# Do whatever triggers the alert, then wait for the alert
# which may or may not appear.
begin
  device_agent.wait_for_springboard_alert(10) # timeout is optional
  device_agent.dismiss_springboard_alert("OK")
rescue RuntimeError
   # Alert did not appear, so there is nothing to do
end
...

# Turn automatic dismiss back on
dismiss_springboard_alerts_automatically!
patrick-silvera commented 7 years ago

Alright, I already implemented this workaround, thank you :)

jmoody commented 7 years ago

Pull request submitted.

jmoody commented 6 years ago

Available in Test Cloud

patrick-silvera commented 6 years ago

Fix validated with calabash 0.21.4 thanks