Is There a way to Handle popups in nightmarejs

802 views Asked by At

I need to handle site's popups window in nightmarejs. I mean things like windows open list, close, scrape those created popups and maybe suscribe to popup creation event

Thank you

2

There are 2 answers

1
云鹏赵 On

I got the same problem in the 2 mouth ago. I think the nightmarejs cant do the popups. I used the spookyjs to slove this problem.

0
Ross On

Depends on what kind of popups you're talking about. For external windows, we're currently out of luck until Electron #2605 is fixed. For HTML flyovers, Nightmare should work fine. For native popups - confirm, alert, etc - you'll need to take a look at defining your own preload.