Frage

I have used UiAutomator in the past. It will not do what I need now, so I am using Espresso. One thing I loved about UiAutomator is the ability to create a UiWatcher. I have many dialogs that appear at random times.

So my question is how could I create a "watcher" that will handle the appropriate dialog if appeared? I have thought about creating a loop that checks for it, but will that be too CPU expensive?

War es hilfreich?

Lösung

There is no such functionality in Espresso. Generally, conditional logic in tests is undesirable - you should control the environment (device) on which your tests execute so you do not get unexpected behavior.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top