Created
September 20, 2013 19:30
-
-
Save thingsinjars/6642623 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
/* "<Given> I wait for "N" seconds */ | |
this.Given(/^I wait for "([^"]*)" seconds$/, function (seconds, callback) { | |
this.pause(seconds*1000, callback); | |
}); | |
/* "<Given> I wait for "elementname" to be present" */ | |
this.Given(/^I wait for "([^"]*)" to be present$/, function (selector, callback) { | |
selector = selectors(selector); | |
this.waitFor(selector, 1000, function (err, result) { | |
if(err) { | |
return callback.fail(JSON.stringify(err)); | |
} | |
callback(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
These would expose WebDriverJS's waitFor and Pause methods via Hardy's generic steps file.