{"id":28324102,"url":"https://github.com/hex0cter/playwright-locator-loop","last_synced_at":"2026-02-09T12:31:30.555Z","repository":{"id":294459317,"uuid":"630348908","full_name":"hex0cter/playwright-locator-loop","owner":"hex0cter","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-20T07:52:13.000Z","size":1141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-13T11:55:12.939Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/microsoft/playwright/issues/22517","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hex0cter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-20T07:36:02.000Z","updated_at":"2023-04-20T07:50:58.000Z","dependencies_parsed_at":"2025-05-20T14:45:55.327Z","dependency_job_id":"6aadb7f0-293d-4691-9994-dac2f556ae9a","html_url":"https://github.com/hex0cter/playwright-locator-loop","commit_stats":null,"previous_names":["hex0cter/playwright-locator-loop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hex0cter/playwright-locator-loop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fplaywright-locator-loop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fplaywright-locator-loop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fplaywright-locator-loop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fplaywright-locator-loop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hex0cter","download_url":"https://codeload.github.com/hex0cter/playwright-locator-loop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hex0cter%2Fplaywright-locator-loop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29265185,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-25T17:09:48.522Z","updated_at":"2026-02-09T12:31:30.534Z","avatar_url":"https://github.com/hex0cter.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Looping all elements results in some elements being selected multiple times\n\u003c!-- ⚠️⚠️ Do not delete this template ⚠️⚠️ --\u003e\n\n\u003c!-- 🔎 Search existing issues to avoid creating duplicates. --\u003e\n\u003c!-- 🧪 Test using the latest Playwright release to see if your issue has already been fixed --\u003e\n\u003c!-- 💡 Provide enough information for us to be able to reproduce your issue locally --\u003e\n\n### System info\n- Playwright Version: 1.32.3\n- Operating System: [macOS 13.2.1 (22D68)]\n- Browser: [Chromium]\n- Other info:\n\n### Source code\n\n- [x] I provided exact source code that allows reproducing the issue locally.\n\n\u003c!-- For simple cases, please provide a self-contained test file along with the config file --\u003e\n\u003c!-- For larger cases, you can provide a GitHub repo you created for this issue --\u003e\n\u003c!-- If we can not reproduce the problem locally, we won't be able to act on it --\u003e\n\u003c!-- You can still file without the exact code and we will try to help, but if we can't repro, it will be closed --\u003e\n\n**Link to the GitHub repository with the repro**\n\n[playwright-locator-loop](https://github.com/hex0cter/playwright-locator-loop)\n\nor\n\n**Config file**\n\n```js\n// playwright.config.ts\n\nimport { PlaywrightTestConfig } from \"@playwright/test\";\n\nconst config: PlaywrightTestConfig = {\n  timeout: 60 * 1000,\n  retries: 0,\n  snapshotDir: \"./snapshots\",\n  reporter: [\n    [\"html\", { outputFolder: `playwright-report` }],\n    [\"line\"],\n  ],\n  projects: [\n    {\n      name: \"chrome\",\n      use: {\n        browserName: \"chromium\",\n        channel: \"chrome\",\n        headless: true,\n        viewport: { width: 1500, height: 730 },\n        acceptDownloads: true,\n        screenshot: \"only-on-failure\",\n        video: \"on\",\n        trace: \"on\",\n      },\n    }\n  ],\n};\n\nexport default config;\n```\n\n**Test file (self-contained)**\n\n```js\n  test(\"should select all checkboxes by a loop\", async ({ page }) =\u003e {\n    page.goto(\n      \"https://staging.scrive.com/s/9221714692413010618/9221932570717574475/d0661b5e62380af4\"\n    );\n    await page.waitForLoadState();\n    await page.waitForLoadState(\"networkidle\");\n\n    const checkboxes = await page.locator(\"rect[data-test='checkbox']\").all();\n    for (const checkbox of checkboxes) {\n      await checkbox.click();\n    }\n\n    await expect(page.locator(\"[data-test='signview_sign_btn']\")).toBeEnabled();\n  });\n\n```\n\n**Steps**\n- npm install\n- npm test\n\n**Expected**\n\nAll checkbox should be checked by the end of the tests. And the Next button on the bottom should be enabled\n\n**Actual**\n\nSome of the checkbox are clicked multiple times and others are never clicked. When I looked at the trace, it seems when playwright loops through all the matching elements, it calls `locator.click(rect[data-test='checkbox'] \u003e\u003e nth=\u003cn\u003e` every time, and the order of that matched list may be non deterministic.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex0cter%2Fplaywright-locator-loop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhex0cter%2Fplaywright-locator-loop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhex0cter%2Fplaywright-locator-loop/lists"}