TestProject Forum
Powered by leading experts in the test automation community

Assertions and Toast message verification

Hello Team,

Need inputs on below points.

1-Is there any way to verify Static toast message ?
2-Can we somehow insert assertions while recording script?


Hi @Akki00101,

Thanks for reaching out! Please find my answers below:

  1. Android Toast messages can be located pretty easily. You will have to create a new element as in the example below

    Then, when this toast message appears, you can perform any action that you want on it.

  2. What kind of assertions exactly do you want to insert? Can you give me an example?
    On each step that returns an output parameter, you can add validation that will fail/pass the step according to the result.

Kind regards,

Hi @amit.yahav,

I have the same problem. I’m trying to check if a Toast contains “Wrong password” text.
Which is the value to set for Select locator field?


Hi Tandu.
You can do the same, use XPATH as a Select Locator field and the text inside will be Wrong password.
That should work.
If you have any questions, feel free to ask.

Regards, Ran.