weikipeng / robotium

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

clickOnActionBarItem(0x1) is not working. #669

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Test using the .apk
2.use solo.clickOnActionBarItem(0x1)
3.

What is the expected output? What do you see instead?
It should open perticular activity

What version of the product are you using? On what operating system?
robotium-solo-5-3-1.jar

Please provide any additional information below.
I am testing using .apk so its not showing R.id.item-id,
I want to click on overflow menu on the action bar and click on setings item. 
solo.clickOnActionBarItem(0x1); worked before but now its not working.

Original issue reported on code.google.com by shiva...@triveous.com on 1 Apr 2015 at 11:32

GoogleCodeExporter commented 9 years ago
solo.sendKey(Solo.MENU);
solo.clickOnText("Settings");

and

solo.clickOnMenuItem("Settings");
Worked but problem is it's opening menu in the middle of the screen by which 
one of the button is going below the list slmost invisible so canot perform 
click on that it says..

junit.framework.AssertionFailedError: Click at (384.0, 1192.0) can not be 
completed! (java.lang.SecurityException: Injecting to another application 
requires INJECT_EVENTS permission) 

Original comment by shiva...@triveous.com on 1 Apr 2015 at 12:06

GoogleCodeExporter commented 9 years ago
When you say clickOnActionbarItem(0x1) used to work before, do you mean in the 
last version it worked and now its not?

Original comment by renasr...@gmail.com on 1 Apr 2015 at 4:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
@rwnasr clickOnActionbarItem(0x1) was working on old action bar but now I have 
changed my action bar to latest appcomat action bar.

 solo.clickOnActionBarItem(0x1); //Not working

//works but menu is opened in the middle of the screen because of that my app 
button moved down(almost invisible) and because of that I cannot click on the 
button.
 solo.sendKey(Solo.MENU); 
 solo.clickOnText("Settings");
 solo.clickOnMenuItem("Settings");

Please help me.

Original comment by shiva...@triveous.com on 9 Apr 2015 at 1:19