Open joshuaManlunas opened 2 years ago
Hey!
Any update on this?
Locator.not()
in the next release.Can someone reopen this issue since the Locator.not()
did not make it due to https://github.com/microsoft/playwright/pull/22223 ?
The Locator.not()
would really be handy, when one has to do Difference of Two Sets (set theory)
I would find this really handy too thanks!
Having already Locator.and
implemented with the internal:and engine, it seems that a similar implementation for a internal.not
should be trivial. Is there any chance of marking this issue with open-to-a-pull-request
?
Use case: Allow Playwright Locator to choose all elements that does NOT have a text or NOT have a class or NOT have the attribute.
Examples: Current state:
locator.locator("css=bx-card-row:not(:has(span.blocked_badge))", {hasText: "Visa Debit Card"})
(Hard to read)Preferred way:
locator.locator("bx-card-row", {hasText: "Visa Debit Card"}).not("text=Blocked")
(Easy to read)