I have an attribute which is data-allocation.
I would like to select the locator for which this locator is different to 0
On the code is
data-allocation="0"
On playwiright, the equal works
await page.locator.click("div[data-allocation ='0']")
but I don’t know how to write different. i try “!=” or “==” and it doesn’t work.
So, how to say to click on locator for which one attribute is different ?
Aurélie Pilette is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
You are looking for the :not()
pseudo class. you can match elements that do not match a list of selectors.
Docs here