Forum Discussion
altus_nel
10 years agoContributor
Hi there,
It may have been mentioned in a previous post, but you should have a look at the "WaitForControlWithText" function.
Even though your text for your toast is changing, surely this is expected for you test scenario and thus you can look for it :)
Have a look below, try it out and see if it works for you.
//JScript
function getToast(){
var android_process = Aliases.Device.Process("com.android.qa");
//Returns boolean value (true = found)
if(android_process.WaitForControlWithText("toast_text","1000")){
//Do something if the text was found
}
else {
//Do something if the toast was not found
}
}