I am automating on Mobile using SeeTest Automation Tool, and I need to validate the Toast Message. How to do it? I am using Selenium WebDriver and C#.
Asked
Active
Viewed 157 times
0
-
Is it possible for you to "learn" the toast-object and wait for it to pop-up (ISElementFound)? – Nisim Naim Sep 10 '17 at 11:11
1 Answers
0
Inspect the toast element using SeeTest Studio. Add the inspected toast message as ToastMessage in Object repository. Use below code to verify toast message:
Assert.IsTrue(
client.WaitForElement(Zone, ToastMessage, 0, 30000),
"ToastMessage is not displayed"
);
Tis will wait for 30 seconds for the toast message to appear. If not the test will fail.
You can also make use of client.isElementFound method also. But since a toast message will appear for few seconds and disappear, WaitForElement is more suitable for this.

Darshan N S
- 97
- 1
- 4