Last active
July 24, 2017 10:38
-
-
Save frnkst/0228e243b3ef227ccbd525f605e8b952 to your computer and use it in GitHub Desktop.
Delay protractor clicks
This file contains 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
// put it on top of the file, not in a describe block | |
// it delays protractor actions by 100ms so you can see | |
// what's happening | |
var origFn = browser.driver.controlFlow().execute; | |
browser.driver.controlFlow().execute = function() { | |
var args = arguments; | |
// queue 100ms wait | |
origFn.call(browser.driver.controlFlow(), function() { | |
return protractor.promise.delayed(100); | |
}); | |
return origFn.apply(browser.driver.controlFlow(), args); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment