mardi 21 août 2018

Puppeteer not recognizing a node

I have some http I'm attempting to automate with CucumberJS and puppeteer:

<button data-test-foo="true" id="ember1213" class="ao-button ao-button--primary ao-button--large ao-button--block ember-view">
<!---->  <span class="ao-button__label">View Related Payment Requests</span>
</button>

When I attempt to page.clisk it:

async selectBeginImportButton() {
    await this.page.click('[data-test-foo="true"]');
}

I get an error:

✖ And I go to the Import files # features/step_definitions/login_steps.js:58
   Error: No node found for selector: [data-test-foo="true"]

What am I doing wrong?




Aucun commentaire:

Enregistrer un commentaire