Discussion:
[Cucumber] Cucumber.js div tags
Add Reply
h***@gmail.com
2018-07-31 18:27:18 UTC
Reply
Permalink
Raw Message
Can you click on a div tag?

i.e.
emberjs handlebars:
<div class="user-profile-button" {{action (toggle 'isOpen' this)}}
data-test-selector="buttonToggleUserInfo15">

Cucumber with puppeteer:
async ePayLogout() {
await this.page.click('[data-test-selector="buttonToggleUserInfo15"]');
//await this.page.click('[data-test-selector="buttonLogout"]');
}

It's not working for me

✖ And I select logout # features/step_definitions/login_steps.js:35

Error: No node found for selector:
[data-test-selector="buttonToggleUserInfo15"]

at assert
(/Users/huckcarignan/Desktop/tmp/cucumberjsPOC/node_modules/puppeteer/lib/helper.js:282:11)

at Frame.click
(/Users/huckcarignan/Desktop/tmp/cucumberjsPOC/node_modules/puppeteer/lib/FrameManager.js:590:5)

at <anonymous>



I'm not sure if it should be - that is, be able to set a data- attribute on
a div tag and be able to click it.

Cheers,
Huck
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...