Would anyone know how to test for the appearance of a Toast message on an Activity?
I'm using code similar to what the OP posted on this question for testing my program flow from one activity to the next. I'd also like to be able to test for toast messages on particular activities.
The android docs specifically mention application context: "This method takes three parameters: the application Context, the text message, and the duration for the toast. It returns a properly initialized Toast object."
An Android Toast is a small message displayed on the screen, similar to a tool tip or other similar popup notification. A Toast is displayed on top of the main content of an activity, and only remains visible for a short time period.
Would anyone know how to test for the appearance of a Toast message on an Activity?
You can't -- sorry. By which, I mean there is no way to ask Android "hey, is a Toast showing? and what does it look like?".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With