Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set Electron size in Nightmare.js?

The Nightmare docs don't specify how to set the browser details.

I'm guessing it's like this, but it doesn't work. Any ideas?

const nightmare = new Nightmare({'show': show, 'BrowserWindow': {height: 900}});
like image 893
Richard Avatar asked Aug 02 '16 08:08

Richard


1 Answers

The documentation isn't terrifically clear, but the intent is to show that the Nightmare options are passed to BrowserWindow, effectively using the same options set.

In other words,

const nightmare = new Nightmare({ show: show, height: 900});

... should work.

like image 91
Ross Avatar answered Nov 18 '22 08:11

Ross