0

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#.

eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44
testing qwerty
  • 105
  • 1
  • 1
  • 12

1 Answers1

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