cancel
Showing results for 
Search instead for 
Did you mean: 

Cucumber Puppeteer Node JS: error trying to call step function with arguments

Highlighted
New Contributor

Cucumber Puppeteer Node JS: error trying to call step function with arguments

Below is code where I try to include arguments in a Then statement (last line) when I am calling a step function I get an error message stating invalid third argument. So how do I pass parameters to the function?

async function confirmSheetCreated(folderName,sheetName) {
    await this.page.waitFor(1500);
    let sheetExists=await this.sheetExists(folderName,sheetName)
    await this.page.isTrue(sheetExists);
}



When('I click plus button in top menu', { timeout: 5*1000 }, clickAddSheet);
When('I click Sheet option in dropdown', { timeout: 5*1000 }, clickSelectSheet);
When('I fill in New Sheet Lookup dialog', { timeout: 5*1000 },fillNewLookupSheetDialog);
When('I click Create New Sheet button',{ timeout: 5*1000 },clickCreateNewSheet);
Then( 'I confirm new sheet created',{ timeout: 5*1000 },  confirmSheetCreated('Revenue','Test Sheet 1'));
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors