com.googlecode.autoandroid.positron.junit3
Class TestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.googlecode.autoandroid.positron.junit3.TestCase
All Implemented Interfaces:
PositronAPI, Test

public class TestCase
extends TestCase
implements PositronAPI


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.googlecode.autoandroid.positron.PositronAPI
PositronAPI.Intents, PositronAPI.Key, PositronAPI.Menu, PositronAPI.Motion
 
Field Summary
protected static PositronAPI positron
           
 
Constructor Summary
TestCase()
           
TestCase(String name)
           
 
Method Summary
 void backup()
          Backup all databases in the tested application.
 void backup(String database)
          Backup the given database.
 boolean booleanAt(int depth, String path)
          Evaluate the ViewShorthand path starting from the activity at the given depth.
 boolean booleanAt(String path)
          Evaluate the ViewShorthand path starting from the current activity.
 void click()
          sendKeyDownUp(KEYCODE_DPAD_CENTER)
 boolean contextMenu(int id)
          invokeContextMenuActionSync with the current activity.
 boolean contextMenu(int id, int flag)
          invokeContextMenuActionSync with the current activity.
 boolean contextMenu(int depth, int id, int flag)
          invokeContextMenuActionSync with the activity at the given depth on the stack, resuming momentarily if necessary.
 double doubleAt(int depth, String path)
          Evaluate the ViewShorthand path starting from the activity at the given depth.
 double doubleAt(String path)
          Evaluate the ViewShorthand path starting from the current activity.
 void drag(float startX, float startY, float endX, float endY)
          Drag from one point on the screen to another.
 void drag(String start, String end)
          Drag from the center of one view to the center of another.
 void finish()
          Finish the current activity.
 void finish(int depth)
          Activity.finish() the activity with the given depth on the stack.
 void finishAll()
          Finish all detected activities on the stack.
 void flick(float x, float y)
          Flick the trackball in the given direction.
 float floatAt(int depth, String path)
          Evaluate the ViewShorthand path starting from the activity at the given depth.
 float floatAt(String path)
          Evaluate the ViewShorthand path starting from the current activity.
 int intAt(int depth, String path)
          Evaluate the ViewShorthand path starting from the activity at the given depth.
 int intAt(String path)
          Evaluate the ViewShorthand path starting from the current activity.
 boolean menu(int id)
          invokeMenuAction with the current activity.
 boolean menu(int id, int flag)
          invokeMenuAction with the current activity.
 boolean menu(int depth, int id, int flag)
          invokeMenuActionSync with the activity at the given depth on the stack, resuming momentarily if necessary.
 void pause()
          Pause execution of the target package.
 boolean paused()
          Is the target package paused?
 void press(Object... keys)
          sendKeyDownUpSync on all keys in order, resuming momentarily if necessary.
 void quit()
          Stop the positron instrumentation and cleanup.
 void restore()
          Restore all databases in the tested application that have backups.
 void restore(String database)
          Restore the given database from a previous backup call.
 void resume()
          Resume executing the target package if it has been paused.
 void sendCharacter(int keyCode)
          sendCharacterSync, resuming momentarily if necessary.
 void sendKey(int action, int code)
          sendKeySync, resuming momentarily if necessary.
 void sendKey(long eventTimeAfterDown, int action, int code, int repeat)
          sendKeySync, resuming momentarily if necessary.
 void sendKey(long eventTimeAfterDown, int action, int code, int repeat, int metaState)
          sendKeySync, resuming momentarily if necessary.
 void sendKey(long eventTimeAfterDown, int action, int code, int repeat, int metaState, int device, int scancode)
          sendKeySync, resuming momentarily if necessary.
 void sendKey(long eventTimeAfterDown, int action, int code, int repeat, int metaState, int device, int scancode, int flags)
          sendKeySync, resuming momentarily if necessary.
 void sendKeyDownUp(int key)
          sendKeyDownUpSync, resuming momentarily if necessary.
 void sendPointer(int action, float x, float y)
          Send a MotionEvent via sendPointerSync, resuming momentarily if needed.
 void sendPointer(int action, float x, float y, int metaState)
          Send a MotionEvent via sendPointerSync, resuming momentarily if needed.
 void sendPointer(long eventTimeAfterDown, int action, float x, float y, float pressure, float size, int metaState, float xPrecision, float yPrecision, int deviceId, int edgeFlags)
          Send a MotionEvent via sendPointerSync, resuming momentarily if needed.
 void sendPointer(long eventTimeAfterDown, int action, float x, float y, int metaState)
          Send a MotionEvent via sendPointerSync, resuming momentarily if needed.
 void sendString(String text)
          sendStringSync, resuming momentarily if necessary.
 void sendTrackball(int action, float x, float y)
          Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed.
 void sendTrackball(int action, float x, float y, int metaState)
          Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed.
 void sendTrackball(long eventTimeAfterDown, int action, float x, float y, float pressure, float size, int metaState, float xPrecision, float yPrecision, int deviceId, int edgeFlags)
          Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed.
 void sendTrackball(long eventTimeAfterDown, int action, float x, float y, int metaState)
          Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed.
 void sql(String database, String script)
          Execute the given Sql script.
 void startActivity(String action)
          startActivitySync, resuming momentarily if necessary.
 void startActivity(String packageName, String className)
          startActivitySync, resuming momentarily if necessary.
 void startActivity(String action, String[] categories)
          startActivitySync, resuming momentarily if necessary.
 void startActivity(String action, String[] categories, int[] flags)
          startActivitySync, resuming momentarily if necessary.
 void startActivity(String action, String data, String type)
          startActivitySync, resuming momentarily if necessary.
 void startActivity(String action, String data, String type, String[] categories, int[] flags)
          startActivitySync, resuming momentarily if necessary.
 String stringAt(int depth, String path)
          Evaluate the ViewShorthand path starting from the activity at the given depth.
 String stringAt(String path)
          Evaluate the ViewShorthand path starting from the current activity.
protected  void tearDown()
          finishAll();
 void touch(float x, float y)
          Touch the screen (or click the pointer) at the given location.
 void touch(String path)
          Touch the screen (or click the pointer) at the center of the view with the given path.
 boolean waitFor(int depth, String path, String value, long timeout)
          Wait until value.equals(stringAt(depth, path)) or the given timeout expires, then pause().
 boolean waitFor(String path, String value, long timeout)
          Wait until value.equals(stringAt(path)) or the given timeout expires, then pause().
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

positron

protected static PositronAPI positron
Constructor Detail

TestCase

public TestCase(String name)

TestCase

public TestCase()
Method Detail

tearDown

protected void tearDown()
                 throws Exception
finishAll();

Overrides:
tearDown in class TestCase
Throws:
Exception

backup

public void backup()
Description copied from interface: PositronAPI
Backup all databases in the tested application.

Specified by:
backup in interface PositronAPI

backup

public void backup(String database)
Description copied from interface: PositronAPI
Backup the given database.

Specified by:
backup in interface PositronAPI

booleanAt

public boolean booleanAt(int depth,
                         String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the activity at the given depth.

Specified by:
booleanAt in interface PositronAPI
Returns:
The result as a boolean.

booleanAt

public boolean booleanAt(String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the current activity.

Specified by:
booleanAt in interface PositronAPI
Returns:
The result as a boolean.

click

public void click()
Description copied from interface: PositronAPI
sendKeyDownUp(KEYCODE_DPAD_CENTER)

Specified by:
click in interface PositronAPI

doubleAt

public double doubleAt(int depth,
                       String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the activity at the given depth.

Specified by:
doubleAt in interface PositronAPI
Returns:
The result as a double.

doubleAt

public double doubleAt(String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the current activity.

Specified by:
doubleAt in interface PositronAPI
Returns:
The result as a double.

sql

public void sql(String database,
                String script)
Description copied from interface: PositronAPI
Execute the given Sql script.

Specified by:
sql in interface PositronAPI

finish

public void finish()
Description copied from interface: PositronAPI
Finish the current activity.

Specified by:
finish in interface PositronAPI

finish

public void finish(int depth)
Description copied from interface: PositronAPI
Activity.finish() the activity with the given depth on the stack.

Specified by:
finish in interface PositronAPI

finishAll

public void finishAll()
Description copied from interface: PositronAPI
Finish all detected activities on the stack.

Specified by:
finishAll in interface PositronAPI

floatAt

public float floatAt(int depth,
                     String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the activity at the given depth.

Specified by:
floatAt in interface PositronAPI
Returns:
The result as a float.

floatAt

public float floatAt(String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the current activity.

Specified by:
floatAt in interface PositronAPI
Returns:
The result as a float.

intAt

public int intAt(int depth,
                 String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the activity at the given depth.

Specified by:
intAt in interface PositronAPI
Returns:
The result as an int.

intAt

public int intAt(String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the current activity.

Specified by:
intAt in interface PositronAPI
Returns:
The result as an int.

menu

public boolean menu(int id)
Description copied from interface: PositronAPI
invokeMenuAction with the current activity.

Specified by:
menu in interface PositronAPI

menu

public boolean menu(int id,
                    int flag)
Description copied from interface: PositronAPI
invokeMenuAction with the current activity.

Specified by:
menu in interface PositronAPI

menu

public boolean menu(int depth,
                    int id,
                    int flag)
Description copied from interface: PositronAPI
invokeMenuActionSync with the activity at the given depth on the stack, resuming momentarily if necessary.

Specified by:
menu in interface PositronAPI

contextMenu

public boolean contextMenu(int id)
Description copied from interface: PositronAPI
invokeContextMenuActionSync with the current activity.

Specified by:
contextMenu in interface PositronAPI

contextMenu

public boolean contextMenu(int id,
                           int flag)
Description copied from interface: PositronAPI
invokeContextMenuActionSync with the current activity.

Specified by:
contextMenu in interface PositronAPI

contextMenu

public boolean contextMenu(int depth,
                           int id,
                           int flag)
Description copied from interface: PositronAPI
invokeContextMenuActionSync with the activity at the given depth on the stack, resuming momentarily if necessary.

Specified by:
contextMenu in interface PositronAPI

pause

public void pause()
Description copied from interface: PositronAPI
Pause execution of the target package. This is useful for inspecting the view state of the target package, since doing so while it is running can create race conditions. Inspect this state using the various 'at' methods. Resume execution with resume(). Pausing an already-paused application is a safe no-op. Paused applications can't respond to events, nor execute synchronous commands such as sendStringSync (or any *Sync.) Keep this in mind when writing tests. Pausing is done by asynchronously calling Instrumentation.runOnMainSync on a blocking operation.

Specified by:
pause in interface PositronAPI

paused

public boolean paused()
Description copied from interface: PositronAPI
Is the target package paused?

Specified by:
paused in interface PositronAPI

press

public void press(Object... keys)
Description copied from interface: PositronAPI
sendKeyDownUpSync on all keys in order, resuming momentarily if necessary. Combined with the renamed constants available in positron.TestCase, this enables things like press(UP, UP, DOWN, DOWN, LEFT, RIGHT, LEFT, RIGHT, "ba") which may otherwise be cumbersome.

Specified by:
press in interface PositronAPI
Parameters:
keys - A mixture of ints and Strings. ints are sent with sendKeyDownUpSync, Strings are send with sendStringSync.

quit

public void quit()
Description copied from interface: PositronAPI
Stop the positron instrumentation and cleanup.

Specified by:
quit in interface PositronAPI

restore

public void restore()
Description copied from interface: PositronAPI
Restore all databases in the tested application that have backups.

Specified by:
restore in interface PositronAPI

restore

public void restore(String database)
Description copied from interface: PositronAPI
Restore the given database from a previous backup call. This deletes the backup as well.

Specified by:
restore in interface PositronAPI

resume

public void resume()
Description copied from interface: PositronAPI
Resume executing the target package if it has been paused. Resuming an unpaused package is a safe noop.

Specified by:
resume in interface PositronAPI

sendCharacter

public void sendCharacter(int keyCode)
Description copied from interface: PositronAPI
sendCharacterSync, resuming momentarily if necessary.

Specified by:
sendCharacter in interface PositronAPI

sendKey

public void sendKey(int action,
                    int code)
Description copied from interface: PositronAPI
sendKeySync, resuming momentarily if necessary.

Specified by:
sendKey in interface PositronAPI

sendKey

public void sendKey(long eventTimeAfterDown,
                    int action,
                    int code,
                    int repeat)
Description copied from interface: PositronAPI
sendKeySync, resuming momentarily if necessary. KeyEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendKey in interface PositronAPI

sendKey

public void sendKey(long eventTimeAfterDown,
                    int action,
                    int code,
                    int repeat,
                    int metaState)
Description copied from interface: PositronAPI
sendKeySync, resuming momentarily if necessary. KeyEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendKey in interface PositronAPI

sendKey

public void sendKey(long eventTimeAfterDown,
                    int action,
                    int code,
                    int repeat,
                    int metaState,
                    int device,
                    int scancode)
Description copied from interface: PositronAPI
sendKeySync, resuming momentarily if necessary. KeyEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendKey in interface PositronAPI

sendKey

public void sendKey(long eventTimeAfterDown,
                    int action,
                    int code,
                    int repeat,
                    int metaState,
                    int device,
                    int scancode,
                    int flags)
Description copied from interface: PositronAPI
sendKeySync, resuming momentarily if necessary. KeyEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendKey in interface PositronAPI

sendKeyDownUp

public void sendKeyDownUp(int key)
Description copied from interface: PositronAPI
sendKeyDownUpSync, resuming momentarily if necessary.

Specified by:
sendKeyDownUp in interface PositronAPI

sendString

public void sendString(String text)
Description copied from interface: PositronAPI
sendStringSync, resuming momentarily if necessary.

Specified by:
sendString in interface PositronAPI

startActivity

public void startActivity(String action,
                          String data,
                          String type,
                          String[] categories,
                          int[] flags)
Description copied from interface: PositronAPI
startActivitySync, resuming momentarily if necessary.

Specified by:
startActivity in interface PositronAPI

startActivity

public void startActivity(String action,
                          String data,
                          String type)
Description copied from interface: PositronAPI
startActivitySync, resuming momentarily if necessary.

Specified by:
startActivity in interface PositronAPI

startActivity

public void startActivity(String packageName,
                          String className)
Description copied from interface: PositronAPI
startActivitySync, resuming momentarily if necessary.

Specified by:
startActivity in interface PositronAPI

startActivity

public void startActivity(String action,
                          String[] categories,
                          int[] flags)
Description copied from interface: PositronAPI
startActivitySync, resuming momentarily if necessary.

Specified by:
startActivity in interface PositronAPI

startActivity

public void startActivity(String action,
                          String[] categories)
Description copied from interface: PositronAPI
startActivitySync, resuming momentarily if necessary.

Specified by:
startActivity in interface PositronAPI

startActivity

public void startActivity(String action)
Description copied from interface: PositronAPI
startActivitySync, resuming momentarily if necessary.

Specified by:
startActivity in interface PositronAPI

stringAt

public String stringAt(int depth,
                       String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the activity at the given depth.

Specified by:
stringAt in interface PositronAPI
Returns:
The result as a String.

stringAt

public String stringAt(String path)
Description copied from interface: PositronAPI
Evaluate the ViewShorthand path starting from the current activity.

Specified by:
stringAt in interface PositronAPI
Returns:
The result as a String.

touch

public void touch(float x,
                  float y)
Description copied from interface: PositronAPI
Touch the screen (or click the pointer) at the given location. This uses sendPointer to send an ACTION_DOWN, and an ACTION_UP a little later.

Specified by:
touch in interface PositronAPI

drag

public void drag(float startX,
                 float startY,
                 float endX,
                 float endY)
Description copied from interface: PositronAPI
Drag from one point on the screen to another. This uses sendPointer to send an ACTION_DOWN at (startX, startY), followed by an ACTION_MOVE to (endX, endY), and finally an ACTION_UP.

Specified by:
drag in interface PositronAPI

sendPointer

public void sendPointer(int action,
                        float x,
                        float y)
Description copied from interface: PositronAPI
Send a MotionEvent via sendPointerSync, resuming momentarily if needed. The eventTimeAfterDown and metaState are both taken to be 0.

Specified by:
sendPointer in interface PositronAPI

sendPointer

public void sendPointer(int action,
                        float x,
                        float y,
                        int metaState)
Description copied from interface: PositronAPI
Send a MotionEvent via sendPointerSync, resuming momentarily if needed. The eventTimeAfterDown is taken to be 0.

Specified by:
sendPointer in interface PositronAPI

sendPointer

public void sendPointer(long eventTimeAfterDown,
                        int action,
                        float x,
                        float y,
                        int metaState)
Description copied from interface: PositronAPI
Send a MotionEvent via sendPointerSync, resuming momentarily if needed. MotionEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendPointer in interface PositronAPI
Parameters:
eventTimeAfterDown - Time in milliseconds since the initial down event.
action - One of the MotionEvent action constants.
x - The x coordinate.
y - The y coordinate.
metaState - Any meta / modifier keys to hold while the sending the event.

sendPointer

public void sendPointer(long eventTimeAfterDown,
                        int action,
                        float x,
                        float y,
                        float pressure,
                        float size,
                        int metaState,
                        float xPrecision,
                        float yPrecision,
                        int deviceId,
                        int edgeFlags)
Description copied from interface: PositronAPI
Send a MotionEvent via sendPointerSync, resuming momentarily if needed. MotionEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendPointer in interface PositronAPI

flick

public void flick(float x,
                  float y)
Description copied from interface: PositronAPI
Flick the trackball in the given direction.

Specified by:
flick in interface PositronAPI

sendTrackball

public void sendTrackball(int action,
                          float x,
                          float y)
Description copied from interface: PositronAPI
Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed. The eventTimeAfterDown and metaState are both taken to be 0.

Specified by:
sendTrackball in interface PositronAPI

sendTrackball

public void sendTrackball(int action,
                          float x,
                          float y,
                          int metaState)
Description copied from interface: PositronAPI
Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed. The eventTimeAfterDown is taken to be 0.

Specified by:
sendTrackball in interface PositronAPI

sendTrackball

public void sendTrackball(long eventTimeAfterDown,
                          int action,
                          float x,
                          float y,
                          int metaState)
Description copied from interface: PositronAPI
Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed. MotionEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendTrackball in interface PositronAPI
Parameters:
eventTimeAfterDown - Time in milliseconds since the initial down event.
action - One of the MotionEvent action constants.
x - The x coordinate.
y - The y coordinate.
metaState - Any meta / modifier keys to hold while the sending the event.

sendTrackball

public void sendTrackball(long eventTimeAfterDown,
                          int action,
                          float x,
                          float y,
                          float pressure,
                          float size,
                          int metaState,
                          float xPrecision,
                          float yPrecision,
                          int deviceId,
                          int edgeFlags)
Description copied from interface: PositronAPI
Send a MotionEvent via sendTrackballEventSync, resuming momentarily if needed. MotionEvents (within the android api) take a downTime which needs to be given as milliseconds from system start, from the uptimeMillis() call. Since stories won't likely have that number around, positron uses the current uptimeMillis for the downTime. An eventTime may be given as milliseconds relative to downTime; the downTime will be added.

Specified by:
sendTrackball in interface PositronAPI

touch

public void touch(String path)
Description copied from interface: PositronAPI
Touch the screen (or click the pointer) at the center of the view with the given path. Once the center of the view is found, this behaves as touch(float, float).

Specified by:
touch in interface PositronAPI

waitFor

public boolean waitFor(String path,
                       String value,
                       long timeout)
Description copied from interface: PositronAPI
Wait until value.equals(stringAt(path)) or the given timeout expires, then pause(). If paused() initially, resume() before waiting. Handy for events (like those from the touch screen) that continue to have side-effects even after the initial event has been processed. This method necessarily polls state in a pause() / resume() cycle. It is possible for the condition to be missed if it is only briefly or intermittently true.

Specified by:
waitFor in interface PositronAPI
Parameters:
path - The view shorthand expression to watch.
value - The value to wait for.
timeout - Time in milliseconds to wait before giving up and pausing anyway.
Returns:
True if the condition was met before the timeout expired.

waitFor

public boolean waitFor(int depth,
                       String path,
                       String value,
                       long timeout)
Description copied from interface: PositronAPI
Wait until value.equals(stringAt(depth, path)) or the given timeout expires, then pause(). If paused() initially, resume() before waiting. Handy for events (like those from the touch screen) that continue to have side-effects even after the initial event has been processed. This method necessarily polls state in a pause() / resume() cycle. It is possible for the condition to be missed if it is only briefly or intermittently true.

Specified by:
waitFor in interface PositronAPI
Parameters:
depth - The depth down the activity stack
path - The view shorthand expression to watch.
value - The value to wait for.
timeout - Time in milliseconds to wait before giving up and pausing anyway.
Returns:
True if the condition was met before the timeout expired.

drag

public void drag(String start,
                 String end)
Description copied from interface: PositronAPI
Drag from the center of one view to the center of another. Once the centers have been found, this behaves as drag(float, float, float, float).

Specified by:
drag in interface PositronAPI