nightwatch

client.elements is not working from a step definition using nightwatch-api

▼魔方 西西 提交于 2020-03-25 18:38:27
问题 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