I'm trying to do nightwatch and cucumber integration for BDD. I'm unable to access client.elements function in a step function.
const { client } = require('nightwatch-api');
const { Given, Then, When } = require('cucumber');
const homePage = client.page.homepage();
Then(/^click "([^"]*)" service from list$/, async(service) => {
let result = await client.url('http://localhost:8080/').elements('css selector', 'div.flex.mt-4.v-card.v-sheet.theme--light > div > div > table > tbody > tr');
console.log(" col length is " + "<->" + result.value.length);
return homePage;
});
Any help is appreciated. thanks!