I want to run particular protractor test and be able to watch and understand what the test are doing on the user interface.
But the different actions is done too fast for me. So is there a way to reduce speed like in selenium ?
I want to run particular protractor test and be able to watch and understand what the test are doing on the user interface.
But the different actions is done too fast for me. So is there a way to reduce speed like in selenium ?
As discussed here, the ability to slow down Webdriver tests was removed for all bindings. A quick google search will tell you you're not alone in wanting this feature, and I would include myself. Sahi has this ability (setSpeed(int interval)
), and it comes in handy for debugging, presentations, etc...
Toward that end, I suggest adding an enhancement request to the Protractor folks...
We can slow down the execution speed using the following simple steps which I have achieved
Step 1:Create a custom config file eg:customConfig.js on the project and put the following code there
var origFn = browser.driver.controlFlow().execute;
browser.driver.controlFlow().execute = function () {
var args = arguments;
origFn.call(browser.driver.controlFlow(), function () {
//increase or reduce time value, its in millisecond
return protractor.promise.delayed(200);
});
return origFn.apply(browser.driver.controlFlow(), args);
};
Step 2:Register this code inside the conf.js file under the specs section
specs: ['customConfig.js','index.js'],