Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

170
Views
How do you match against an OR case in Playwright?

The Playwright documentation says "Comma-separated list of CSS selectors will match all elements that can be selected by one of the selectors in that list." but it doesn't work.

If I do this:

await expect(page.locator('text="Banana"')).toBeVisible();

it matches, but if I do this:

await expect(page.locator('text="Banana", text="foo"')).toBeVisible();

it hangs

Is this not a "CSS selector"? how do I do the equivalent properly?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Yes, this is not a CSS selector. However, you can do it this way:

await expect(page.locator('span:has-text("Banana"), span:has-text("foo")')).toBeVisible();
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!