Company
Date Published
Author
Wim Selles
Word count
1798
Language
English
Hacker News points
None

Summary

Appium can be used to automate end-to-end (E2E) user flows on iOS devices, which cannot be achieved with native frameworks like Espresso and XCUITest. A real E2E user flow involves switching between an app and a browser, such as when opening a link in the browser from within the app. To achieve this, Appium's `fullContextList` capability is used to retrieve an array of Webview-objects containing the id, title, and URL of each loaded web view. By filtering out the native app context and selecting the correct web view based on its URL, it is possible to switch contexts and interact with the browser as if it were a desktop web page. This can be achieved by using Appium 1.15.0 or later, which includes a new capability called `includeSafariInWebviews` that adds Safari as a Webview, resolving a challenge previously faced when trying to automate user flows involving Safari.