mercredi 28 janvier 2015

Is there a way to set toast messages in UiAutomator as an object to look for when running automation?

Is there a way to set toast messages in UiAutomator as an object to look for when running automation?


I am doing automation for testing an android app and I have not found any solution to check whether the toast appears or not. I have read on How to test for the appearance of a Toast message that it can be done like



if(someToast == null)
someToast = Toast.makeText(this, "sdfdsf", Toast.LENGTH_LONG);
boolean isShown = someToast.getView().isShown();


but I am not able to make a Toast as an UiObject. Also on google group http://ift.tt/1CMWYTQ


it is mentioned that some API is to launch for that but I have got no update.


Aucun commentaire:

Enregistrer un commentaire