You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
onView(withId(R.id.abc)).perform(click()) sometimes does long click instead
What is the expected output? What do you see instead?
It should always do click. Doing long click sometimes makes the test flaky.
What version of the product are you using? On what operating system?
All versions of Android OS. Espresso 1.1 test kit
Please provide any additional information below.
I understand that you put a comment there saying that there's no perfect way to
do this, but I remember that I didn't see this problem when I was using
Robotium. Here is what Robotium does:
long downTime = SystemClock.uptimeMillis();
long eventTime = SystemClock.uptimeMillis();
MotionEvent event = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_DOWN, x, y, 0);
MotionEvent event2 = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_UP, x, y, 0);
try{
inst.sendPointerSync(event);
inst.sendPointerSync(event2);
successfull = true;
}
Espresso is using the UiController, so it may not be able to send motion event
like Robotium does. But, the downtime and event time is also different between
Espresso and Robotium. Maybe it can improve this problem by making this part of
code as close as Robotium.
Original issue reported on code.google.com by [email protected] on 15 Jan 2014 at 8:56
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 15 Jan 2014 at 8:56The text was updated successfully, but these errors were encountered: