segment-boneyard / nightmare

A high-level browser automation library.
https://open.segment.com
19.54k stars 1.08k forks source link

not work with electron-build #1612

Open davisbra opened 4 years ago

davisbra commented 4 years ago

I use nightmare on electron. it works fine in debugging mode. but when I build electron app with electron-builder, it not work and it open multiple window of electron main app. how can I fix this issue? its my code:

mainWindow.loadURL('https://google.com') const Nightmare = require('nightmare') const nightmare = Nightmare({autoHideMenuBar:true,menuBarVisible:false, electronPath: require('electron').app.getPath('exe');, show: true, }); nightmare.goto("https://github.com") .catch(error => { console.error('Search failed:', error) })

nemeshine commented 3 years ago

is that result in electron just white screen???

nibirgama commented 3 years ago

@davisbra have able to solve the issue ? i am also facing the same problem