WebDriverAgent icon indicating copy to clipboard operation
WebDriverAgent copied to clipboard

add app switcher in api?

Open KevinChan168 opened this issue 1 year ago • 3 comments

in the simulator, choose device, app switcher, the simulator will run the switcher do you consider add wda/appswitcher?

KevinChan168 avatar Aug 02 '23 10:08 KevinChan168

Do you have any idea how to achieve it via WDA?

I guess you would like to do like via assistive touch's app switcher in real devices. Afaik, we could enable the assistive touch via appium-ios-device, but WDA cannot interact with the assistive touch. So no good one API method for it. https://github.com/appium/appium-ios-device/issues/122

It possibly can do swipe-up action for non-physical home button devices but not sure of the necessity for automation purpose as Appium/WDA.

KazuCocoa avatar Aug 03 '23 07:08 KazuCocoa

Do you have any idea how to achieve it via WDA?

I guess you would like to do like via assistive touch's app switcher in real devices. Afaik, we could enable the assistive touch via appium-ios-device, but WDA cannot interact with the assistive touch. So no good one API method for it. appium/appium-ios-device#122

It possibly can do swipe-up action for non-physical home button devices but not sure of the necessity for automation purpose as Appium/WDA. It has nothing to with assistive touch What I expect is simulating swipe up action to open app switcher in my automation case, I tried using XCUICoordinate offset dx:0 dy:1, to dx:0 dy:0, but it seems not working at all. I think there would be an api that can be called to open app switcher instead of swiping up to open the switcher.

KevinChan168 avatar Aug 03 '23 08:08 KevinChan168

I think there would be an api that can be called to open app switcher instead of swiping up to open the switcher.

It would be great if you could find out. Then, it is appreciated to share it with us. (I only found via assistive touch method, so no direct api)

The gesture approach works only non-physical home button devices, so personally, it would be nice to keep it as your implementation with w3c actions for your test case. For iPad usage, maybe some situation work, but some might not.

It is welcome to create a PR, btw. Perhaps if such API can confirm the app switcher is active, it may be great. For example the gesture approach works only when currently the device has no app switcher view. I haven't confirmed if we could do such detection though.

KazuCocoa avatar Aug 03 '23 08:08 KazuCocoa