79425650

Date: 2025-02-09 20:34:19
Score: 0.5
Natty:
Report link

there are 2 steps for take all enabled element with locator in playwrigth (docs enabled here(link)):

  1. use locator.all().
  2. chaining js filter function.

for example:

await (await page.locator('your locator').all()).filter((el: Locator) => el.isEnabled()) 
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: salvo720