Click Long On Image using Robotium - robotium

I want my test to click on an image for about 20-30 seconds, How can I achieve this with current robotium version.

solo.clickLongOnView(view, time); if image is a view or solo.clickLongOnScreen(x, y, time);

Related

How to stop MPAndroidChart chart.centerViewToAnimated( currentXVisible + 60, currentY, YAxis.AxisDependency.LEFT, 15000 );

I am wanting to animate my drawn data, with controls much like a media player: Play, Stop, fast forward, etc....over my Xaxis - AKA over time....
I have tried creating my own Runnable both on and off the UI thread with no success with making calls to increment the xvalue by small amounts, etc .... but does not move the view port windows.
I can get my chart to animate using chart.centerViewToAnimated, but want to be able to "stop" this animation ... I cannot see how to do this even with a ViewPortHandler...
Any ideas??
It looks like the animation started by chart.centerViewToAnimated(...) cannot be cancelled. So you need to make small steps. If the steps are small enough, you can use chart.centerViewTo(...) (without animation).
I have implemented this with 50ms interval and it looks decent.

Loading in background

All game assests are broken into portions according to the game Levels.
So while user play Level #1, next level is being loaded in background.
But there is a strange behaviour with the sprites when preloading is active.
Sprites are played way faster.
Here is a test case: http://cjstest.comlu.com/index.html
Click "Play" button. You can see a moving rect at 16 FPS speed.
Click "Load L2" button. You'll notice that rect has started moving faster.
Look this tutorial
Use event.delta for the animation not depent of framerate.
function tick(event) {
// move 100 pixels per second (elapsedTimeInMS / 1000msPerSecond * pixelsPerSecond):
circle.x += event.delta/1000*100;
}

Display images on the screen for the user to select

How do I display some images on kinect display screen so that the user selects the desired image by hand?
Go through this tutorial skeletal tracking. Once you are able to do this, you just have to measure the time which one hand was holding on a specific location. This can be done only with Kinect data, and if that time exceeds a certain threshold you can trigger it as a button click. Get an idea of what I'm trying to explain here from the below link virtual dressing room

Why do I get a delay when executing animations first time?

I am using imageWithContentsOfFile: to load my .png images into an array. When the IBAction triggers the animation, there is a noticeable delay before the animation starts. Then, each time after that, it executes smoothly. I originally tried to load them with the imageNamed: method but experienced the same delay plus big performance problems on the device.
Load the images in ViewWillLoad instead.
If that doesn't work, use the developer tool Instruments (built into xcode) to find what is causing the performance hit. Choose Open GL ES driver, under the iOS -> graphics menu. Then tick Hide system libraries. Then it will show you which methods are taking a long time, click into those methods to see exactly which lines, then just try and figure out alternative ways to do it.

reduce the size of the selenium frame

I do I reduce the size of the selenium frame, in order to increase the frame of the website I am testing?
You can start the Selenium server in a multiwindow mode:
-multiWindow: puts you into a mode where the test web site executes in a
separate window, and selenium
supports frames
http://seleniumhq.org/docs/05_selenium_rc.html#server-options
If you want to resize the window once you've done multiWindow mode, you can also do getEval("window.resizeTo(X, Y); window.moveTo(0,0);") where X and Y are the width and height of the window you want.