Wow, thanks so much, everyone! 🙌 I didn’t expect so many helpful replies. I tried setting up `page.on('dialog')` before the action like a few of you suggested, and it worked like a charm! Also, the tip about using `waitForTimeout` for delayed alerts was a lifesaver.
I do have one follow-up question though: has anyone dealt with alerts that only show up in certain browser conditions? Like, they work fine in headless mode but not in headed mode? It’s driving me nuts lol.
Thanks again, you all rock! 🚀
I do have one follow-up question though: has anyone dealt with alerts that only show up in certain browser conditions? Like, they work fine in headless mode but not in headed mode? It’s driving me nuts lol.
Thanks again, you all rock! 🚀
