These are chat archives for rosshinkley/nightmare

Apr 2017
Sergio Crisostomo
Apr 25 2017 03:46
morning! trying to trigger copy/ paste, any one that can give some pointers?
Sergio Crisostomo
Apr 25 2017 05:35
Ah! got it working! ^ and posted a answer
Andrew Alanis
Apr 25 2017 20:59
I have issues getting nightmare to do a simple "click" action on a login form... I run the css selector ".login-submit" in my console in chrome and it gets it just fine and can use the click function....however... when nightmare does it with the electron just sits and never clicks the button....the project is an ionic 2 / angular 2 web app...if that helps... anyone have any problems with click issues like this? below is the simple test code I am running.

``` "use strict";
const Nightmare = require('nightmare');
const expect = require('chai').expect;
const BASE_URL = 'http://localhost:8100/';
const onError = (err) => {
console.error("Test-runner failed: ", err);
const assert = require('assert');

describe('Login Workflow', function () {

let nightmare = null;
beforeEach(() => {
nightmare = new Nightmare({
show: true,
typeInterval: 20,
pollInterval: 50

describe('given bad Login', () => {
it('should fail', done => {
.evaluate(() => {
return localStorage.clear();
.on('page', (type, message) => {
if (type == 'alert') done()
.type('.login-email-input .text-input', 'notgonnawork')
.type('.login-pass-input .text-input', 'invalid password')
}); ```

Andrew Alanis
Apr 25 2017 21:27
another thing I noticed the chrome debugger I can click the button on the console doing document.querySelector('.login-submit').click() but when I try to do that in electron doesn't work...the querySelector by itself pulls up the element though on both browsers...