79515592

Date: 2025-03-17 19:39:06
Score: 0.5
Natty:
Report link

Maybe easiest of the options is applying filter method to your getByText().

const buttonsCount = await page.getByText('(Optimal on desktop / tablet)')
  .filter({ visible: true })
  .count()

See Matching only visible elements

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Karen.Schlossberg