austgl / robotium

Automatically exported from code.google.com/p/robotium
0 stars 0 forks source link

Not able to click on menu item #189

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi All,

Please have a loot code below

solo.waitForActivity("xxxxx.RegistrationActivity",200);
solo.searchText("India");
solo.clickOnText("Next");
solo.waitForActivity("xxx.VerifyCodeActivity",200);
solo.clickOnText("Send Text"); //This will invoke the phone SMS App.

Now we need to send the SMS. we are using following code; however it doesn't 
work. 

solo.clickOnMenuItem("Send");

What should be done? essentially test started with one app and now it has moved 
to another app (sms). 

Thanks
Sneha

Original issue reported on code.google.com by snehamon...@gmail.com on 30 Nov 2011 at 7:19

GoogleCodeExporter commented 9 years ago
Do you mean that Send menu item is placed in other app ?
If so you can't use solo there.
Robotium works only in context of your application.

Original comment by sergey.t...@gmail.com on 30 Nov 2011 at 8:15

GoogleCodeExporter commented 9 years ago
hmmm.. got it..

If i need to automate such scenarios - then what should i do?

Sneha

Original comment by snehamon...@gmail.com on 30 Nov 2011 at 9:14

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 30 Nov 2011 at 1:48

GoogleCodeExporter commented 9 years ago
Good news:
You can use monkeyrunner tool
http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html

You should make python script as described and run it when you want to do this
solo.clickOnMenuItem("Send");

Bad news:
You can only click on coordinates. And send key events.

Hope it helps

Original comment by sergey.t...@gmail.com on 1 Dec 2011 at 8:04