sangmingming / robotium

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

solo.getText does not return the text when applied to a menu #228

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open a menu using solo.sendKey(KeyEvent.KEYCODE_MENU);
2. Attempt to get text on index using solo.getText(0)
3.

What is the expected output? What do you see instead?
I expect to return the text on the first menu item. Instead if I print the 
value I get com.android.internal.view.menu.IconMenuItemView@44dd0ce8.

What version of the product are you using? On what operating system?
wersion 2.5
WinXP
Eclipse 3.7

Please provide any additional information below.

Original issue reported on code.google.com by amarpree...@gmail.com on 26 Feb 2012 at 7:25

GoogleCodeExporter commented 9 years ago
Please try the following with Robotium 3.1. 

TextView textView = solo.getText(0);
Log.d("Robotium", "text: " + textView.getText().toString();

What does it print?

Original comment by renasr...@gmail.com on 27 Feb 2012 at 7:13

GoogleCodeExporter commented 9 years ago
Thanks, It works now. I get my expected values and can compare them with what 
I've stored in my expected. 

Original comment by amarpree...@gmail.com on 27 Feb 2012 at 8:26

GoogleCodeExporter commented 9 years ago

Original comment by renasr...@gmail.com on 27 Feb 2012 at 8:27