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
I've always found the page.$, page.$$ (and their eval and frame etc. counterparts) weird as function names. Mainly for the fact that $ really is no English word giving any information as to what they do. I believe this might come from jQuery, but I have no idea why Playwright would need to follow that style.
Now that e.g. page.waitForSelector() exists, is there e.g. any need at all for page.$? I realize there is no equivalent for page.$$ (and maybe the evals, although element.innerHtml() etc. now exists that can be done outside of an eval.)
The text was updated successfully, but these errors were encountered:
Your suggestion makes total sense, but it is too late for us to back from the beloved $. It does not wait for selector by the way, so if you know element it there, that's the fastest way of getting a hold of a handle...
My reasoning was that since you are in beta, there wasn't any "too lates" yet 😄
Would adding documentation to the .$ and .$$ at least be good to mention they do not wait for selectors? Since most users will end up using the direct action commands and waitForSelector() (guessing here) - I'd say some users who never used Playwright (nor Puppeteer) would know the difference between e.g. page.$() and page.waitForSelector() by just reading the docs (if they are lucky they can guess).
I've always found the
page.$
,page.$$
(and their eval and frame etc. counterparts) weird as function names. Mainly for the fact that$
really is no English word giving any information as to what they do. I believe this might come from jQuery, but I have no idea why Playwright would need to follow that style.Now that e.g.
page.waitForSelector()
exists, is there e.g. any need at all forpage.$
? I realize there is no equivalent forpage.$$
(and maybe the evals, althoughelement.innerHtml()
etc. now exists that can be done outside of an eval.)The text was updated successfully, but these errors were encountered: