const BrowserWindow = remote.BrowserWindow;
const IGWin = new BrowserWindow({
show: false,
webPreferences: {
plugins: true,
allowDisplayingInsecureContent: true
},
});
IGWin.loadURL('https://instagram.com');
IGWin.once('ready-to-show', () => {
IGWin.show();
IGWin.title = "TEST";
IGWin.webContents.on('did-finish-load', function() {
setTimeout(function () {
IGWin.webContents.executeJavaScript("$('input[name=username]').value = 1");
}, 1100)
});
})
I get this error: https://i.stack.imgur.com/33RxQ.png
I have tried changing ' to " and " to " and " to `` and nothing worked, i don't know what cause this problem and i hope someone will let me know what to change in code because i already spent like 1 hour and i can't find solution. I will really appreciate if someone will solve this for me.