lino-levan / astral

A high-level puppeteer/playwright-like library for Deno
https://jsr.io/@astral/astral
MIT License
176 stars 7 forks source link

chore: enhancement waitForSelector method #48

Closed Jess182 closed 4 months ago

Jess182 commented 4 months ago

Currently the waitForSelector method does not work as expected, the method never fails since the validation of the while loop is not precise (this.#celestial.DOM.querySelector() always returns an object even if the node is not found).

image

Therefore, this change suggests a modification in the validation and the implementation of a custom timeout by the user.