Closed GoogleCodeExporter closed 9 years ago
FYI, others are having the same issue ->
http://stackoverflow.com/questions/16375351/robotium-in-no-window-emulator-throw
s-click-can-not-be-completed/16405219
Original comment by daniel.o...@silvercar.com
on 6 May 2013 at 6:51
Without a window, robotium can not send a pointer sync to click a view. Please
see this discussion:
http://groups.google.com/group/robotium-developers/browse_thread/thread/a115a228
02a348fb
Original comment by renasr...@gmail.com
on 8 May 2013 at 12:11
I tried responding in that link and some clever person decided not to approve
my comment. I'll write it here. I don't understand why Robotium can't do this
but ActivityInstrumentationTestCase2 is able to.
Example.
The following does not work:
solo.clickOnView(view);
But the following does work:
runTestOnUiThread(new Runnable() {
@Override
public void run() {
assertTrue(view.performClick());
}
});
Why can't Robotium perform the click in the UI thread and thus get around this
problem? Why am I able to code a workaround and Robotium can't implement this
workaround in a headless environment?
Original comment by gamebo...@gmail.com
on 8 May 2013 at 7:33
The way in which Robotium works is that it sends a pointer sync and in that
way emulates a real user clicking somewhere. It asks a view where it is
located and then sends a pointer sync that location. When you are using
your app with non-window the view will give incorrect values back as its
not really shown in any window.
Original comment by renasr...@gmail.com
on 9 May 2013 at 6:16
Original issue reported on code.google.com by
daniel.o...@silvercar.com
on 6 May 2013 at 6:46