Forum Discussion
4 Replies
- altus_nelContributor
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 } }
- harsh_chhibberContributor
Hi
I tried below function actually when the screen comes where toast message display- Objects are not visible in Object Browser for this particular screen. It is mobile device calling screen when we dial any number. Application is dependent on this screen to make a call.
So I am getting Object not found issue for android_process. Is there any other approach to capture toast message.
var android_process = Aliases.Device.Process("com.android.qa");
- altus_nelContributor
Hi there,
Please have a look at your Object Browser. In there you will see a "Mobile" parent node with a "Device" child node. Inside the "Device" node you will find the "Process" node. Select this node and have a look at the "ProcessName" property. This is the value you must use to address your process.
var android_process = Aliases.Device.Process(<process_name>);