Skip to content

Instantly share code, notes, and snippets.

@frnkst
Last active July 24, 2017 10:38
Show Gist options
  • Save frnkst/0228e243b3ef227ccbd525f605e8b952 to your computer and use it in GitHub Desktop.
Save frnkst/0228e243b3ef227ccbd525f605e8b952 to your computer and use it in GitHub Desktop.
Delay protractor clicks
// 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