Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Q: using toHaveSelector #132

Open
basz opened this issue Mar 20, 2022 · 1 comment
Open

Q: using toHaveSelector #132

basz opened this issue Mar 20, 2022 · 1 comment
Labels

Comments

@basz
Copy link

basz commented Mar 20, 2022

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>
@mxschmitt
Copy link
Member

mxschmitt commented Mar 21, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants