-
Notifications
You must be signed in to change notification settings - Fork 7
Home
androidTest KTX is a collection of Kotlin extension functions for Espresso and UIAutomator libraries, carefully named and chained in order to simplify the querying and commanding the UI.
Additionally, by using the Kotlin infix functions, we're able to improve the readability by removing the braces from the calls. The end result should be a sentence-like syntax which is descriptive enough by itself.
The idea behind these extension functions is to create a DSL in front of Espresso and UIAutomator, so that end user (developer) doesn't have to know which library is used in the background, nor to know full set of commands for each library. Instead, by using unique syntax and identically named functions for both libraries, click
, hold
, scroll
, typeText
etc are descriptive enough, without thinkging further of implementation in the background, nor how the UI component is queried.