Closed mykola-mokhnach closed 4 months ago
Thanks for doing this. From what I can tell this only handles
XCUIElementTypeAlert
elements, which should cover most cases, but I vaguely recall (from my own projects) that there may be some other element types as well (e.g. picker wheels or file sharing modals). I will check this on Monday/Tuesday, but those can also be handled in a separate PR if necessary.
I don't remember any cases where springboard shows something different from an alert. Please provide examples of the system app page source for such cases.
I'm also curious about other cases.
So far, I have checked like below share features before. They were not managed by springboard, so the same app scope worked. Default photos, a couple of 3rd party apps. Actually, they could depend on the app implementation so this might not be the all cases.
After seeing the comment, I checked some data picker (XCUIElementTypeDatePicker
, XCUIElementTypePickerWheel
) implementations in a few apps like apple's calender and 3rd party apps I knew of, they worked in their own scope (so not springboard)
I will check my project on Monday/Tuesday, but I don't think it should block this PR.
:tada: This PR is included in version 8.7.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Okay, I have checked a bit and found 2 cases where springboard places something other than an alert over the app:
I will have more time to investigate the XMLs tomorrow.
@mykola-mokhnach here is a gist with XMLs for the two TestFlight screens mentioned above (edited for privacy): https://gist.github.com/eglitise/4704401148fef1db400e8e6be782973b
Currently we detect the app under test as active if XCTest returns RunningInForeground state for it. In case the app is covered by a system alert from springboard this might be confusing as we cannot interact with it unless an alert is properly handled. The new setting called
respectSystemAlerts
being set totrue
(by default it isfalse
) forces WDA to verify the presence of alerts shown by springboard and return the latter if an alert is shown. This affects the performance of active app detection, but might be more convenient for writing test script (e.g. eliminates the need of proactive switching between system and custom apps).