Using protractor-cucumber-framework
, I try to click a button a hundred times in one step. However, doing this will result in a timeout with a default value of 5000 ms. I would prefer not to change this default value using:
var config = function() { this.setDefaultTimeout(60*1000); }; module.exports = config;
This works, but I would rather set a timeout for this single step like this:
this.When(/^I click on the "([^"]*)" button$/, {timeout: 60*1000}, function(text, callback) {
According to cucumber-js readme, this should work, but still leads to:
Error: Step timed out after 5000 milliseconds at Timer.listOnTimeout (timer.js:92:15)
Any ideas on why this is not working?
EDIT: It really worked. However, I used it incorrectly. Calling click()
hundred times does not take much time. It expires on the step after it:
this.Then(/^a new widget is created$/, {timeout: 60 * 1000}, function(callback) {
Can someone explain why a long timeout is required in the step after all the click
calls? Is there a more elegant way for the cucumber to wait for the button to finish?
source share