You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the status of this? The year is 2024 and we still need to test if the result of waitForSelector returns null.
It could be so nice, that the hidden: true option, was refactored into its own method, like waitForHiddenSelector, and only let this one return null (or void).
Steps to reproduce
Tell us about your environment:
What steps will reproduce the problem?
Please include code that reproduces the issue.
const el = await page.waitForSelector(
some-selector);
console.log(el.getProperty('somewhat'))
What is the expected result?
No error
What happens instead?
error TS2531: Object is possibly 'null'
.Ideally an overload should be added specifically checking if
hidden: true
, otherwise we have to add annoying null assertions where none are needed.The text was updated successfully, but these errors were encountered: