KrithGhosh
KrithGhosh

Reputation: 88

Appium negative test case

I'm trying to test a negative case via Appium for an Android application. On unsuccessful login, it shows a toast message, need to assert the toast value/message. How can I achieve that ?

Upvotes: 0

Views: 238

Answers (1)

dmle
dmle

Reputation: 3658

UIAutomator2 supports finding toast messages, so you you need to set it in desired capabilities like:

automationName: UIAutomator2

and then you can search for it like any other element. If you are using java-client, example is here

Upvotes: 1

Related Questions