Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Android's Espresso framework was created as a "gray-box" testing framework, with the intent of improving testing
- Like how the Espresso framework improved upon UiAutomator2, the Appium Espresso driver brings with it several improvements over the Appium UiAutomator2 driver
- * Less flakiness thanks to IdlingResource
- * Espresso uses a thing called `IdlingResource`. Explain breifly what that is
- * What this means is that Espresso blocks on the UI thread until it's idle
- * Mention the downside is that it might be stuck, and never not be idle. Appium Espresso Driver does disable animations though
- * Use-case: Give an example in UiAutomator2 that shows waits, delays, etc.... then show an example in Espresso that takes those out
- * Access to the internals of the app
- * The Espresso framework is "gray-box", which means that we can access the internals of the application, unlike UiAutomator2
- * This allows us access to internals of the application
- * Briefly mention the `mobile: backdoor` method
- * Use case: `view-tag` selector. React Native testers wanted the ability to select items by `view-tag` because they didn't want to pollute the accessibility tag with data that would confuse people using screen-readers.
- * WebAtoms
- * Explain the Chromedriver problems we've had and the version mismatching, and the problem with finding/setting the context
- * Mention how sometimes all you need to do is simply input a username and password and press submit
- * Explain what WebAtoms are
- * The `mobile: webAtoms` endpoint gives you the ability to get through this
- * Use-case: A native app that uses OAuth and needs to enter username and password into a webview. Show WebAtoms example of enterring username and password.
- * Find elements off-screen
- * UiAutomator2 is constrained to selecting elements that are inside of the viewport
- * Finding elements off-screen requires scrolling, checking, scrolling-again until the element is in viewport (show code example)
- * Using Espresso's `onData` matcher, we can target elements off-screen
- * Explain how it uses `Adapter`
- * Use-case: Write a data matcher for an element that is an Adapter item and is off-screen
- * You can still use UiAutomator
- * The one caveat of all of this, is that you can only run Espresso tests on the AUT (app-under-test)
- * Espresso can't be run on other apps because the other apps are signed
- * No problem, we have the `mobile: uiautomator2` endpoint to take care of those cases
- * Give an example use-case of having to navigate an external app
Add Comment
Please, Sign In to add comment