# From when Appium is going to support identification and automation of toast messages?

**URL:** <https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293>\
**Category:** Support\
**Created:** [November 27, 2015, 7:39am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293 "2015-11-27T07:39:25Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abdul\_Sathar\_Beigh](https://discuss.appium.io/user_avatar/discuss.appium.io/abdul_sathar_beigh/32/1612_2.png) [@Abdul\_Sathar\_Beigh](https://discuss.appium.io/u/Abdul_Sathar_Beigh)\
**Post date:** [November 27, 2015, 7:39am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/1 "2015-11-27T07:39:25Z")

</div>

Continuing the discussion from [Appium 1.4.16 released](https://discuss.appium.io/t/appium-1-4-16-released/7201):

> [@Appium 1.4.16 released](https://discuss.appium.io/t/appium-1-4-16-released/7201/1):
>
> We are happy to announce release of 1.4.16, this fixes important webview issues with iOS 9.2.
> 
> Changelog:
> 
> #### iOS
> 
> - fix for safari and webview issues for 9.2

@jonahss @moizjv  
Thanks in Advance 😄

---

<div class="post-metadata">

**Author:** ![sanoj27](https://discuss.appium.io/user_avatar/discuss.appium.io/sanoj27/32/1375_2.png) [@sanoj27](https://discuss.appium.io/u/sanoj27)\
**Post date:** [November 27, 2015, 8:54am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/2 "2015-11-27T08:54:08Z")

</div>

How can we launch safari in real devices say I have iPod 5 (OS version 8.0.2). I have written the code like below:

package com.mob.safari;

import java.net.MalformedURLException;  
import java.net.URL;

import org.openqa.selenium.WebElement;  
import org.openqa.selenium.remote.CapabilityType;  
import org.openqa.selenium.remote.DesiredCapabilities;  
import org.testng.annotations.AfterTest;  
import org.testng.annotations.BeforeTest;  
import org.testng.annotations.Test;

import io.appium.java\_client.AppiumDriver;  
import io.appium.java\_client.MobileElement;

public class SafariLaunch {  
AppiumDriver driver;

```
@Test
public void Launch() {
	// driver.get("http://google.com");
}

@BeforeTest
public void beforeTest() throws MalformedURLException {
	DesiredCapabilities capabilities = new DesiredCapabilities();
	capabilities.setCapability("platformName", "iOS");
	capabilities.setCapability("deviceName", "iPod 5");
	capabilities.setCapability(CapabilityType.VERSION, "8.0.2");
	capabilities.setCapability("udid", "af5020497b55d10f41a88c488051a85927765a08");
	capabilities.setCapability(CapabilityType.BROWSER_NAME, "safari");
	URL url = new URL("http", "0.0.0.0", 4723, "/wd/hub");
	driver = new AppiumDriver<WebElement>(url, capabilities) {

		@Override
		public MobileElement scrollToExact(String arg0) {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public MobileElement scrollTo(String arg0) {
			// TODO Auto-generated method stub
			return null;
		}
	};
	driver.get("https://www.google.com/");

}

@AfterTest
public void afterTest() {

}

```

}

Following are the errors I am getting when run the code.

org.openqa.selenium.SessionNotCreatedException: A new session could not be created. (Original error: ENOENT: no such file or directory, stat ‘/usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip’) (WARNING: The server did not provide any stacktrace information)  
Command duration or timeout: 674 milliseconds  
Build info: version: ‘2.47.1’, revision: ‘411b314’, time: ‘2015-07-30 03:03:16’  
System info: host: ‘Sanojs-Mac-mini.local’, ip: ‘172.16.2.243’, os.name: ‘Mac OS X’, os.arch: ‘x86\_64’, os.version: ‘10.11’, java.version: ‘1.8.0\_60’  
Driver info: com.mob.safari.SafariLaunch$1

My system spec:

MAC OS: 10.11  
Xcode: 7.0

Please help me to run the safari in real devices. Because next we are starting the mobile web automation using appium.

---

<div class="post-metadata">

**Author:** ![Abdul\_Sathar\_Beigh](https://discuss.appium.io/user_avatar/discuss.appium.io/abdul_sathar_beigh/32/1612_2.png) [@Abdul\_Sathar\_Beigh](https://discuss.appium.io/u/Abdul_Sathar_Beigh)\
**Post date:** [November 27, 2015, 9:02am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/3 "2015-11-27T09:02:39Z")

</div>

@sanoj27 Can you post your Appium Log here??

---

<div class="post-metadata">

**Author:** ![sanoj27](https://discuss.appium.io/user_avatar/discuss.appium.io/sanoj27/32/1375_2.png) [@sanoj27](https://discuss.appium.io/u/sanoj27)\
**Post date:** [November 27, 2015, 9:04am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/4 "2015-11-27T09:04:41Z")

</div>

Here is the logs:

Last login: Fri Nov 27 00:43:00 on ttys001  
Sanojs-Mac-mini:~ sanoj$ appium  
info: Welcome to Appium v1.4.16 (REV ae6877eff263066b26328d457bd285c0cc62430d)  
info: Appium REST http interface listener started on 0.0.0.0:4723  
info: Console LogLevel: debug  
info: --\> POST /wd/hub/session {“desiredCapabilities”:{“appium-version”:“1.3.1”,“browserName”:“safari”,“udid”:“af5020497b55d10f41a88c488051a85927765a08”,“platformName”:“iOS”,“deviceName”:“iPod 5”,“version”:“8.0.2”}}  
info: Client User-Agent string: Apache-HttpClient/4.4.1 (Java/1.8.0\_60)  
info: [debug] The following desired capabilities were provided, but not recognized by appium. They will be passed on to any other services running on this server. : appium-version, version  
info: [debug] Configuring Safari session  
info: [debug] Using local .zip from command line: /usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip  
info: [debug] Copying local zip to tmp dir  
info: [debug] Got configuration error, not starting session  
info: [debug] Cleaning up appium session  
error: Failed to start an Appium session, err was: Error: ENOENT: no such file or directory, stat ‘/usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip’  
info: [debug] Error: ENOENT: no such file or directory, stat ‘/usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip’  
at Error (native)  
info: [debug] Responding to client with error: {“status”:33,“value”:{“message”:“A new session could not be created. (Original error: ENOENT: no such file or directory, stat ‘/usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip’)”,“errno”:-2,“code”:“ENOENT”,“syscall”:“stat”,“path”:"/usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip",“origValue”:“ENOENT: no such file or directory, stat ‘/usr/local/lib/node\_modules/appium/build/SafariLauncher/SafariLauncher.zip’”},“sessionId”:null}  
info: \<-- POST /wd/hub/session 500 13.459 ms - 482

---

<div class="post-metadata">

**Author:** ![Abdul\_Sathar\_Beigh](https://discuss.appium.io/user_avatar/discuss.appium.io/abdul_sathar_beigh/32/1612_2.png) [@Abdul\_Sathar\_Beigh](https://discuss.appium.io/u/Abdul_Sathar_Beigh)\
**Post date:** [November 27, 2015, 9:19am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/5 "2015-11-27T09:19:09Z")

</div>

@sanoj27 have a look into the following link : [Solution to launch Safari Browser in Real Device](https://github.com/appium/appium/issues/4535)

Hope, it resolves your problem 😉

---

<div class="post-metadata">

**Author:** ![Abdul\_Sathar\_Beigh](https://discuss.appium.io/user_avatar/discuss.appium.io/abdul_sathar_beigh/32/1612_2.png) [@Abdul\_Sathar\_Beigh](https://discuss.appium.io/u/Abdul_Sathar_Beigh)\
**Post date:** [December 3, 2015, 11:22am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/6 "2015-12-03T11:22:32Z")

</div>

Hi @jonahss, Can you please provide some information regarding “From when Appium is going to support identification and automation of toast messages?”  
This information is very essential for me for my current project. 😊

---

<div class="post-metadata">

**Author:** ![jonahss](https://discuss.appium.io/user_avatar/discuss.appium.io/jonahss/32/5340_2.png) [@jonahss](https://discuss.appium.io/u/jonahss)\
**Post date:** [December 7, 2015, 6:37pm UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/7 "2015-12-07T18:37:49Z")

</div>

I assume you’re talking about Android.

I don’t think the Android project has given us any way to automate Toasts. You’ll have to ask them to provide us a way to interact with them through UiAutomator2.

Or can you find a hack? I didn’t see anything quickly looking on Stack Overflow.

---

<div class="post-metadata">

**Author:** ![Abdul\_Sathar\_Beigh](https://discuss.appium.io/user_avatar/discuss.appium.io/abdul_sathar_beigh/32/1612_2.png) [@Abdul\_Sathar\_Beigh](https://discuss.appium.io/u/Abdul_Sathar_Beigh)\
**Post date:** [December 22, 2015, 6:52am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/8 "2015-12-22T06:52:31Z")

</div>

Hi @jonahss,  
Really appreciate that you took time to reply to my query, Thanks!

I understand your point, So can you please suggest me any proper alternative(hack) to handle toast message verification. I have tried a lot to find alternatives over Google but didn’t get any proper solution, So if you are aware of any solution, Please help me out.

---

<div class="post-metadata">

**Author:** ![jonahss](https://discuss.appium.io/user_avatar/discuss.appium.io/jonahss/32/5340_2.png) [@jonahss](https://discuss.appium.io/u/jonahss)\
**Post date:** [January 4, 2016, 9:56pm UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/9 "2016-01-04T21:56:16Z")

</div>

Ooh, try taking a screenshot when the toast is expected to appear.

You can use image-recognition software, or a visual test regression product like Applitools to run assertions based on the image.

---

<div class="post-metadata">

**Author:** ![Appium\_Master](https://discuss.appium.io/user_avatar/discuss.appium.io/appium_master/32/6458_2.png) [@Appium\_Master](https://discuss.appium.io/u/Appium_Master)\
**Post date:** [March 18, 2016, 11:55am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/10 "2016-03-18T11:55:05Z")

</div>

Check this

---

<div class="post-metadata">

**Author:** ![alangithubtrader](https://discuss.appium.io/user_avatar/discuss.appium.io/alangithubtrader/32/1135_2.png) [@alangithubtrader](https://discuss.appium.io/u/alangithubtrader)\
**Post date:** [March 18, 2016, 9:55pm UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/11 "2016-03-18T21:55:53Z")

</div>

> [@Verifying Toast](https://discuss.appium.io/t/verifying-toast/3676/6):
>
> For step 4, these links really helped me. [https://code.msdn.microsoft.com/windowsdesktop/How-to-use-Tessnet2-library-716be12f](https://code.msdn.microsoft.com/windowsdesktop/How-to-use-Tessnet2-library-716be12f)

---

<div class="post-metadata">

**Author:** ![Sravanmedarapu](https://discuss.appium.io/letter_avatar_proxy/v4/letter/s/90db22/32.png) [@Sravanmedarapu](https://discuss.appium.io/u/Sravanmedarapu)\
**Post date:** [December 2, 2016, 6:22am UTC](https://discuss.appium.io/t/from-when-appium-is-going-to-support-identification-and-automation-of-toast-messages/7293/12 "2016-12-02T06:22:49Z")

</div>

Using latest version of appium-uiautomator2-driver should support toast message verification

refer sample java [test](https://github.com/appium/java-client/blob/35f6290571f06a1e358c4f4422b9eecbefe6294a/src/test/java/io/appium/java_client/android/UIAutomator2Test.java#L87)
