Created
April 23, 2015 18:40
-
-
Save Jonahss/7cff13d1ab7ce6775960 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var targetWindow = UIATarget.localTarget().frontMostApp().mainWindow(); | |
var targetApp = UIATarget.localTarget(); | |
var interval = 1000; //ms interval to repeat | |
var wait = 5; //seconds to wait | |
var tapLocation = {x: 300, y: 300}; | |
var future = new Date(); | |
future.setSeconds(future.getSeconds()+wait); | |
var now = function() { | |
return new Date(); | |
} | |
var repetitions = 0; | |
function repeatOperation() { | |
UIALogger.logPass('repeatOperation'+repetitions.toString()); | |
var targetApp = UIATarget.localTarget(); | |
// targetApp.tap(tapLocation); | |
repetitions++; | |
} | |
while(now() < future) { | |
repeatOperation(); | |
UIATarget.localTarget().delay(1); | |
} | |
throw new Error("oh boyyyyyyyyyy"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment