Questions tagged [nightmare]

Nightmare is a node module which implements a high-level bridge between node.js and the headless PhantomJS browser. Nightmare v2 switches to electron (atom-shell) as the underlying browser. Please include the version that you use in your question.

Definition:

According to the Official Documentation:

Nightmare is a high-level browser automation library from Segment.

The goal is to expose a few simple methods that mimic user actions (like goto, type and click), with an API that feels synchronous for each block of scripting, rather than deeply nested callbacks. It was originally designed for automating tasks across sites that don't have APIs, but is most often used for UI testing and crawling.

Under the covers it uses Electron, which is similar to PhantomJS but roughly twice as fast and more modern.

Important Links:

456 questions
6
votes
1 answer

NightmareJS multiple evaluations

NightmareJS works great when I am running one evaluation, but as I interact with the page I need to do more evaluations as things pass. However using the docs I tried a simple sample of chaining evaluations and I get an error: describe('test google…
Helmut Granda
  • 4,565
  • 7
  • 35
  • 51
5
votes
5 answers

How to automate ElectronJS app

We're looking to develop an ElectronJS app for particular website automation at our desk job, which includes common tasks like login, form filling, report downloading etc. We've tried basic tutorial of ElectronJS, Spectron, NightmareJS, Puppeteer…
D Joe
  • 51
  • 1
  • 3
5
votes
1 answer

nightmare-download-manager in aws lambda

I was using nightmare js to automate a file download. So two days back we decided to move this tool in to aws lambda and I Was able to get the aws stuff running with nightmare using nightmare-lambda-tutorial, but my lambda used one more nightmare…
Sam
  • 649
  • 1
  • 6
  • 17
5
votes
1 answer

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}});
Richard
  • 14,798
  • 21
  • 70
  • 103
5
votes
1 answer

Nightmare.js conditional browsing

I'm trying to understand how I should make a nightmare.js script using "if-then" logic. For example var Nightmare = require('nightmare'); var nightmare = Nightmare({ show: true, paths: { userData: '/dev/null' } }); nightmare …
Fluffy
  • 27,504
  • 41
  • 151
  • 234
5
votes
3 answers

Nightmare.js with Docker

I'm attempting to run Nightmare.js on the server. I'm well aware that it's headless on Linux, and requires xvfb. What I don't understand is why I continue to get the following error when in DEBUG mode: nightmare queuing process start +0ms …
Nick Parsons
  • 8,377
  • 13
  • 48
  • 70
5
votes
3 answers

Nightmare JS not working

I know the title of the question looks very vague! But that's there's to it. I installed nodejs on my production server, which had phantomjs working properly, then I installed nightmare via npm install nightmare, I can see it in node_modules, I…
AL-Kateb
  • 2,914
  • 3
  • 20
  • 24
5
votes
1 answer

Nightmare Js evaluate page

I running following code using Nightmare.js: var test = new Nightmare() .viewport(1000, 1000) .useragent("Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36") …
martin
  • 53
  • 1
  • 1
  • 4
4
votes
0 answers

How to load a webpage using Nightmare JS

I am using Nightmare JS to create a web bot that visits Facebook's Marketplace and renews the first listing for me. However, only the navigation bar loads when the bot runs and the rest of the body is left blank. I am curious how I can load this,…
klaurtar1
  • 700
  • 2
  • 8
  • 29
4
votes
0 answers

How to save PDF file contents in machine getting via a link using Nightmare.js

I am using NightmareJs for getting the pdf contents from an Amazon link. Because my link is secure so its ask for username and password for…
Parveen yadav
  • 2,252
  • 1
  • 21
  • 35
4
votes
1 answer

Scraping using NightmareJS with NodeJS

I'm trying to scrape and save the results into my database. I'm using NodeJS (sails.js framework) This is a working a example using cheerio: getRequest('some-url').then((data) => { const $ = cheerio.load(data); let title =…
TheUnreal
  • 23,434
  • 46
  • 157
  • 277
4
votes
2 answers

NodeJS: How to do nightmareJS e2e-testing on running docker application

I am creating a docker image/container for testing purpose from my productive build application (nodeJS app). Now I want to do some e2e testing using mocha/chai and nightmareJS. So I have created a very basic test file. My problem is now how to test…
user3142695
  • 15,844
  • 47
  • 176
  • 332
4
votes
0 answers

Extend DefinitelyTyped .d.ts definitions

I try to use nightmare in typescript with the types from DefinitelyTyped. however, the types there are incomplete (the then method is missing) and I also want to add dynamically some methods (as it is done in this plugin). I don't understand how to…
Louis Roché
  • 876
  • 1
  • 7
  • 19
4
votes
2 answers

Nightmarejs .click() on each element with delay between

I am trying to make simple follow script with Nightmarejs. It should work in next way: Go to some user profile Click on button to open list of followers of that user Click all follow buttons with delay between each click Click load more Repeat step…
4
votes
0 answers

phantom stdout: TypeError: undefined is not a constructor (evaluating)

I use nightmare (phantomjs wrapper) to crawl webpage, but I get error: phantom stdout: TypeError: undefined is not a constructor (evaluating …
Vo Thanh Thang
  • 330
  • 1
  • 5
  • 16
1
2
3
30 31