I just read https://playwright.dev/docs/selectors/#text-selector
There are a few ways to look for text on a page, but I cannot from the docs deduct which one I should use. For example these three:
await page.click('#nav-bar >> text=Playwright');
await page.click('#nav-bar:has-text("Playwright")');
await page.click('#nav-bar :text("Playwright")');
To me, these seem functionally equivalent from the docs. Is that assumption incorrect?
Also, which one is the Best practice to use out of these? I've always used >> text before the other psuedo classes became available, but I am not sure that if I refactor my code which of these I should use. >> text has looks cleaner to me, easier to read, and is faster to type.