sangmingming / robotium

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

Click Long on Screen on device home screen gives exception #161

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. clickLongOnScreen with screen coordinates to open folders after clicking on 
device HOME to see the Folders context menu.
2.
3.

What is the expected output? What do you see instead?
The Folders menu on the device must open. Instead I get exception:
junit.framework.AssertionFailedError: Click can not be completed! Something is 
in the way e.g. the keyboard.
        at com.jayway.android.robotium.solo.Clicker.clickLongOnScreen(Clicker.java:98)
        at com.jayway.android.robotium.solo.Solo.clickLongOnScreen(Solo.java:651)

What version of the product are you using? On what operating system?

solo 2.2, windows xp

Please provide any additional information below.
Basically I need to click long on screen to open the folders context menu to 
click on a folder inside the context menu. but i got the screen coordinates by 
the following:
int width = pageSolo.getCurrentActivity().getWindowManager().getDefaultDisplay()
        .getWidth();
        int height = pageSolo.getCurrentActivity().getWindowManager().getDefaultDisplay()
        .getHeight();

I used the width and height obtained to click long on screen after clicking on 
device HOME button but see exceptions. I tried width/2, height/2 yet the same 
issue.

Original issue reported on code.google.com by pr...@anvaya.net on 20 Sep 2011 at 6:38

GoogleCodeExporter commented 9 years ago
You are not allowed to interact with another application (home button belongs 
to another application. Please see our QA page.

Original comment by renasr...@gmail.com on 21 Sep 2011 at 5:13