Open truebit opened 9 years ago
I added some verbose output, found that the length of monkey.config.conditionHandlers
is 0 when RELEASE_THE_MONKEY()
method start running
my code is like:
#import "ui-auto-monkey/UIAutoMonkey.js"
#import "ui-auto-monkey/buttonHandler.js"
monkey = new UIAutoMonkey()
monkey.config.minutesToRun = 60 * 2;
monkey.config.checkTimeEvery = 60;
monkey.config.numberOfEvents = false;
var handlers = [ ];
handlers.push(new ButtonHandler("Back", 30, false));
monkey.config.conditionHandlers = handlers;
// Release the monkey!
monkey.RELEASE_THE_MONKEY();
Did you comment out the "RELEASE_THE_MONKEY() code in the orginal UIAutoMonkey.js file"?
I set monkey to run in 2 hours (a.k.a 120 minuete), and I also created a ButtonHandler. I add the logs in buttonhandler, I found that the ButtonHandler was never triggered until one minutes running.
See the first and last line in the log. the last line is the log I added in buttonhandler. that's its first appearance