grafana / xk6-browser

The browser module adds support for browser automation and end-to-end web testing via the Chrome Devtools Protocol to k6.
https://grafana.com/docs/k6/latest/javascript-api/k6-browser/
GNU Affero General Public License v3.0
344 stars 41 forks source link

Enhance `waitForSelector` cryptic JavaScript error message #1461

Closed inancgumus closed 3 weeks ago

inancgumus commented 1 month ago

What?

Explain which selector didn't resolve to an element.

Why?

waitForSelector in the injected script results in a confusing error message:

        selector did not resolve to any element

Tasks

### Tasks
- [x] [ ]
- [ ] Update the k6 release notes and release tasks
- [ ] #1462

Related PR(s)/Issue(s)

No response