I'm trying to understand if there is a way to detect those.
I'm writing a js bot that navigates through a list of websites and perform different actions. I'm not quiete sure how this project will end nor where it leads but I'm learning a lot. It happens some of the websites send me an 'alert' popup, which freezes my browser and my bot by extension until I refresh the page manually.
It might sound like a dumb question but I've looked for hours and most stuff I could find was about selenium, or for back-end webmasters, to check if the alert is showing correctly on client-side.
I tried some window.addEventListener(alert, myFunction() { ... })
but it doesn't work at all. There is just too much informations and google isn't helping me at all to find the right answer.
Hopefully someone could share the code of a isAlertPresent()
- like function. I don't need it to click on OK, just to know if an alert is present at a precise time.
Thank you all!