(no title)
forcepushed | 17 days ago
Do you feel yourself wanting to extract this logic (wait for a selector, load state, or function evaluating etc) to some shared utility and then just pushing all of your interactions through this as a sort of feedback engine for future problems?
benoau|15 days ago
Yeah that's basically what Playwright is doing under the hood, your click is more like "wait for the element to exist and then click". Back in my puppeteer days I'd usually have my own click/etc functions wrapping everything in a try/catch and retrying.
It's very hard to balance because ultimately the solution is basically always waiting <arbitrary ms> after any interaction and that itself is dependent on how busy the CPU is which varies between local vs CI, and you blow up your running time by setting like "slowMo" to 100ms for example.