expect-playwright
expect-playwright copied to clipboard
Q: using toHaveSelector
This fails
await expect(page).toHaveSelector('div.ember-cli-notifications-notification__container');
where this passes
await expect(page).toHaveSelector('div#content-wrapper');
are selector's something other then CSS selectors? Or perhaps I expect different behavior?
I am certain a div.ember-cli-notifications-notification__container exists on my page
<div class="ember-cli-notifications-notification__container ember-cli-notifications-notification__container--bottom-right" style="z-index: 1060;" data-test-notification-container="bottom-right">
<!----></div>
<div id="content-wrapper" class="min-100h d-flex flex-column flex-nowrap"></div>
Selectors are Playwright selectors: https://playwright.dev/docs/selectors
We btw. recommend migrating to Playwright Test, since they have now all of these matchers included by default.