I'm doing some tests of android apps in eclipse, and I have a method to click the back arrow to which I pass a Activity
:
public void flechaAtras(Activity activity) {
Display mdisp = activity.getWindowManager().getDefaultDisplay();
Point mdispSize = new Point();
mdisp.getSize(mdispSize);
int maxX = mdispSize.x;
int maxY = mdispSize.y;
TouchAction touchAction = new TouchAction(getDriver());
touchAction.tap(new PointOption().withCoordinates (250, maxY - 80)).perform();
}
How can I get the activity that I send?