You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 29, 2024. It is now read-only.
Reasons for adopting a new feature:
Protractor needs a method for specifying a delay between changing of each visual element so that QA engineers and other people not familiar with Protractor, can observe what is happening at each step. It is possible to enter manual browser.sleep() everywhere in your code, but for a few hundred lines of tests, it would mean a lot of code duplication. It would be great if we could just set a "speed factor" in the configuration and have the tests run in the browser in a reasonable speed that it can be observed by a third-party without knowledge of the code.
Is this a breaking change?
No, it would just be an additional optional functional that doesn't break anything.
Could you please update your request with the information for feature requests in the issue template?
I don't see how this is a dramatic improvement over browser.pause. You can also record your tests or use a service like SauceLabs that does something similar for you.
@NickTomlin Please see the revised version. Basically, as a developer we can definitely do browser.pause() to debug, but in a real-life situation where you would have to demo it to others, it is more convenient to have a version that automatically goes through each statement with delays in-between. If protractor doesn't want to offer an in-house solution, do you know how it could be done manually?
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(200); // here we can adjust the execution speed
});
return origFn.apply(browser.driver.controlFlow(), args);
};
This code worked out for me, add it in your beforeEach and you'll notice protractor runs a little slower, allowing anyone to see what's happening :)
Activity
NickTomlin commentedon Feb 29, 2016
Could you please update your request with the information for feature requests in the issue template?
I don't see how this is a dramatic improvement over
browser.pause. You can also record your tests or use a service like SauceLabs that does something similar for you.philoniare commentedon Mar 1, 2016
@NickTomlin Please see the revised version. Basically, as a developer we can definitely do browser.pause() to debug, but in a real-life situation where you would have to demo it to others, it is more convenient to have a version that automatically goes through each statement with delays in-between. If protractor doesn't want to offer an in-house solution, do you know how it could be done manually?
Thanks!
Xotabu4 commentedon Mar 3, 2016
@philoniare you can record video and slow down playback instead
Emilemuny commentedon Jun 27, 2016
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(200); // here we can adjust the execution speed
});
return origFn.apply(browser.driver.controlFlow(), args);
};
This code worked out for me, add it in your beforeEach and you'll notice protractor runs a little slower, allowing anyone to see what's happening :)
juliemr commentedon Jul 14, 2016
This might be a nice thing to include in Blocking Proxy @mgiambalvo
heathkit commentedon Dec 19, 2016
This should be covered by angular/blocking-proxy#14
dixitgargi commentedon Apr 27, 2018
above provided cod is not working at my end getting below error:
TypeError: Cannot read property 'controlFlow' of undefined