segment-boneyard / nightmare

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

How are you using Nightmare? #113

Closed reinpk closed 9 years ago

reinpk commented 9 years ago

We're seeing a wide variety of use-cases, would love to hear what you've been using it for, thanks!

freetonik commented 9 years ago

Hey! We're about to start using Nightmare to test our open source web-ide for programming lessons at Hexlet https://github.com/Hexlet/hexlet-ide. We run a virtual machine for each user and give them web-ide with terminal to write code and complete exercises.

The only issue we might have is phantom js not being very good when it comes to web sockets (which we use to make RPC calls).

leandono commented 9 years ago

Actually, we (Rodati.com) are using Nightmare as part of our internal platform of functional/integration testing. In the past, we used casperjs, but the poor integration with nodejs forced us to migrate to another library. For now, Nightmare is working OK with our platform, but, we are experimenting some problems with the limited API exposed by the library (compared to casperjs) and the difficulty of debug Nightmare if the browser have a problem with a page (specially using evaluate). So, for that, we are thinking test another alternatives like node-horseman or our fork of Nightmare. Anyway, congrats for the great work!

reinpk commented 9 years ago

@dzignus what are the specific parts of the API you're missing?

leandono commented 9 years ago

For example:

I know that these methods can be simulated using evaluate/chaining low level methods (like click(), type(), etc), but the consecuencies are (in the first case) a overuse of evaluate, spending a lot of time debugging if something is not working properly or (in the second case) fragile or unmaintainable code.

mickaelandrieu commented 9 years ago

@dzignus if you need all the CasperJS API, the best way will be to use ... CasperJS.

Anyway, I think nightmare can provide more plugins, inspirated by CasperJS API.

leandono commented 9 years ago

Yep, that's the point, my opinion is that many people are using Nightmare as a replace of casperjs, for that many are demanding features like my example of above.

oinant commented 9 years ago

I started a website crawler to retrieve data from sites that don't have any public api. As its depedencies are really limited, there is no problem to use it in web-ide (as cloud9 for exemple)

JonForest commented 9 years ago

I've just started to use Nightmare to write automated browser tests, mainly because the API is a lot nicer to use than Selenium's for node. I'm not altogether sure of a solution, but I've also run into problems where I'm not getting the data back I expect from the website under test, and have not been able to extract enough information to work out why.
I need to fiddle with it some more; I'm prepared to persist because it's such a graceful API, but if we're going to get Nightmare.js to excel in this area it needs more complete docs and examples.

rclai commented 9 years ago

I've been using it to automate to logging in to vendor sites to grab open order reports and it's been quite nice.

reinpk commented 9 years ago

FYI we just released 2.x which seems to fix a lot of problems by migrating from phantomjs to electron under the hood

fundkis commented 8 years ago

We at fund kis use it to render high quality pdf documents. we used phantomjs for that but since you switched to electron, we migrated to use nightmare. It also simplified our code. Thanks for that but please keep in mind this rendering usage...

techtonik commented 7 years ago

We would like to use Nightmare for migrating our test from DalekJS (which is dead), but it seems that Nightmare is Webkit/Chromium only. Electron doesn't work on older systems and doesn't cover Firefox and other browsers.