Closed GoogleCodeExporter closed 9 years ago
Thanks for reporting this. Does it work better if you use:
clickLongOnScreen(float x, float y, int time) instead? With time set to
something high. Also which version of Android are you running on?
Original comment by renasr...@gmail.com
on 19 Oct 2012 at 4:08
Also not work if I using clickLongOnScreen(float x, float y, int time) with
high time set(such as 8s). Android version: 4.1.1
Original comment by onlyfors...@gmail.com
on 19 Oct 2012 at 5:42
Please use 8000 as time. It's in milliseconds.
Den 19 okt 2012 07:43 skrev <robotium@googlecode.com>:
Original comment by renasr...@gmail.com
on 19 Oct 2012 at 6:20
We used 8000 as time(8s).
Original comment by onlyfors...@gmail.com
on 19 Oct 2012 at 8:10
Would it be possible for you to send me a sample app that exhibits this issue?
Original comment by renasr...@gmail.com
on 19 Oct 2012 at 8:20
I think it is a common issue for clickLongOnScreen. Always happened when I
using this method.
Original comment by onlyfors...@gmail.com
on 22 Oct 2012 at 2:52
I am not able to reproduce the issue. Have tried all the clickLong methods on
4.1.1 and they work well. That is why I am asking for a sample app that
exhibits this issue.
Original comment by renasr...@gmail.com
on 22 Oct 2012 at 6:26
Thanks again for reporting this. The behaviour of the old clickOnScreen (it
used a deprecated method) will be included in the next release.
Original comment by renasr...@gmail.com
on 23 Oct 2012 at 8:37
Thanks again for reporting this. It has been fixed in Robotium 3.6.
Original comment by renasr...@gmail.com
on 19 Nov 2012 at 6:06
Hello!
I have tested clickLongOnScreen() function with Google Maps MapView.
It does not work on some devices and simulators.
Does not work on:
1. Galaxy S (2.3.7)
2. Android 4.2 simulator
So still buggy.
Original comment by shared.a...@gmail.com
on 27 Nov 2012 at 9:48
Robotium 3.6
Original comment by shared.a...@gmail.com
on 27 Nov 2012 at 9:48
I found woraround for this bug in Robotium 3.6:
The issue is in calling of ViewConfiguration.getTouchSlop() in robotium's
clickLongOnScreen(). This method is deprecated and may work incorrecly on some
devices.
I just copy this function in my test and use it instead of
solo.clickLongOnScreen():
public void clickLongOnScreen(float x, float y, int time)
{
final Instrumentation inst = getInstrumentation();
long downTime = SystemClock.uptimeMillis();
long eventTime = SystemClock.uptimeMillis();
MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, x, y, 0);
try
{
inst.sendPointerSync(event);
}
catch(SecurityException e)
{
Log.e("TYPHOON_TEST", e.getMessage());
}
eventTime = SystemClock.uptimeMillis();
event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_MOVE,
x + 1.0f,
y + 1.0f, 0);
inst.sendPointerSync(event);
try
{
Thread.sleep(time);
}
catch(InterruptedException e)
{
Log.e("TYPHOON_TEST", e.getMessage());
}
eventTime = SystemClock.uptimeMillis();
event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_UP, x, y, 0);
inst.sendPointerSync(event);
try
{
Thread.sleep(500);
}
catch(InterruptedException e)
{
Log.e("TYPHOON_TEST", e.getMessage());
}
}
Original comment by shared.a...@gmail.com
on 27 Nov 2012 at 10:38
Issue 361 has been merged into this issue.
Original comment by renasr...@gmail.com
on 27 Nov 2012 at 4:13
Opening up this issue again.
Original comment by renasr...@gmail.com
on 28 Nov 2012 at 4:29
This has been fixed in Robotium 4.0.
Original comment by renasr...@gmail.com
on 27 Feb 2013 at 6:24
Original issue reported on code.google.com by
onlyfors...@gmail.com
on 19 Oct 2012 at 2:18