question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal how to support Toast Messages on Android

See original GitHub issue

I decided to open a new issue for this enhancement since the #968 was closed with “closed because Google needs to add this to uiautomator” comment.

IMHO there would be a way to support this by using the Accessiblity Services i.e.

  1. implement a ToastRecorder app that catches & records the Toasts (see http://stackoverflow.com/questions/10659734/detecting-toast-messages)
  2. include that app in the appium apk’s that are installed on the device
  3. enhance the Appium API to access the ToastRecorder data

In that stackover thread is a link to an App that is recoding Toasts. Currently I’m using that App to verify Toasts. To support this in Appium would be much better because using an extra app is pretty cumbersome for the verification. Currently I need to do the following:

  1. run the tests for my app “normally” with appium
  2. After execution start that Toaster App and verify that all expected Toast were recorded.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
proudSDETcommented, Jun 22, 2016

Hi Appium team, Is this going to be supported by Appium anytime soon? Are there any plans to support this in near future?

2reactions
pastel001commented, Oct 14, 2016

can appium support mobile blackbox test perfectly now? i dont know how to get a toast i dont kow how to get a SMS… so many difficulties… i am at a loss what to do

Read more comments on GitHub >

github_iconTop Results From Across the Web

Toasts overview - Android Developers
A toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message...
Read more >
Defining 'Toast' Messages - Adrian Roselli
Instead of reviewing each of the ~50 examples, I am going to break down some of the broader concepts and risks that you...
Read more >
Detecting toast messages - android - Stack Overflow
It's possible to catch Messages/Notifications with an Accessibility Service, have a look at that.
Read more >
What Is a Toast Message, and How Do You Use It? - MagicBell
Below, we'll discuss how to use Toast messages in a pure Android development environment. Android supports both Kotlin and Java for coding, ...
Read more >
1264561 - Security: Chrome for Android Hide Entering ...
avoid the UI from being canceled or hidden by other Toast messages. Bug: 1264561. Change-Id: If8d425d875bdd26e1cf82623bacfbe19ca56d8eb Reviewed-on: https:// ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found