3

in our app we are using Toast.makeText(context, context.getString(R.string.contact_not_present), Toast.LENGTH_SHORT).show(); to show toast message

For Ui Automation we are using https://developer.android.com/training/testing/ui-automator

While automating a use case which should fire a Toast message ,As expected the toast message was fired but i am unable to find it

I am trying to locate the element by

UiObject2 object = device.wait(Until.findObject(By.clazz("android.widget.Toast")), 9000);

But i am always getting the object as null

can anyone help me on this ?

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.