We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.49.1
test('repro', async ({ page, server }) => { await page.setContent(`<html><body><script>setTimeout(() => {document.body.innerHTML = '<div><ul><li>Foo</li></ul><ul><li>Bar</li></ul></div>'}, 100)</script></body></html>`); await page.addLocatorHandler(page.locator('ul'), async locator => Promise.resolve()); await page.locator('ul > li').first().boundingBox(); });
Error: locator.boundingBox: Error: strict mode violation: locator('ul') resolved to 2 elements: 1) <ul>…</ul> aka getByRole('list').filter({ hasText: 'Foo' }) 2) <ul>…</ul> aka getByRole('list').filter({ hasText: 'Bar' }) Call log: - waiting for locator('ul > li').first() 379 | await page.addLocatorHandler(page.locator('ul'), async locator => Promise.resolve()); 380 | > 381 | await page.locator('ul > li').first().boundingBox();
The error message should read something like:
Error: page.addLocatorHandler: Error: strict mode violation: locator('ul') resolved to 2 elements:
The error message instead reads:
Error: locator.boundingBox: Error: strict mode violation: locator('ul') resolved to 2 elements:
Notice that it complains about locator.boundingBox even though that call did not fail.
locator.boundingBox
No response
System: OS: Windows 11 10.0.26100 CPU: (6) x64 Intel(R) Core(TM) i5-9500 CPU @ 3.00GHz Memory: 2.76 GB / 15.81 GB Binaries: Node: 20.17.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD npm: 10.8.2 - C:\Program Files\nodejs\npm.CMD IDEs: VSCode: 1.95.2 - C:\Users\agastineau\AppData\Local\Programs\Microsoft VS Code\bin\code.CMD
The text was updated successfully, but these errors were encountered:
agg23
Successfully merging a pull request may close this issue.
Version
1.49.1
Steps to reproduce
Expected behavior
The error message should read something like:
Actual behavior
The error message instead reads:
Notice that it complains about
locator.boundingBox
even though that call did not fail.Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: