Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Max Malm
    @benjick
    I wanna create an action that's like login('username', 'password')
    Max Malm
    @benjick
    nightmare.action('login', function(done) {
      this.evaluate_now(function(username, password) {
        this.type('#login_username', username).type(
          '#login_password',
          username,
        );
        return this;
      }, done);
    });
    This is what I tried
    Davide De Gennaro
    @dege88
    @benjick I'm sorry, I've never used the actions
    I would have done it this way:
    async function login(nightmare, user, pass) {
        await nightmare
            .type('#login_username', user)
            .type('#login_password', pass);
        return nightmare;
    }
    Matt Jarrett
    @matt-jarrett

    Hi!

    When I try to this simple code to open Adidas site it hangs at an empty Electron window. Other sites seem to work fine. Any tips?

    const Nightmare = require("nightmare")
    const nightmare = Nightmare({ show: true })
    
    nightmare
      .goto("http://www.adidas.com/us")
      .end()
      .then((result) => {
        console.log(result)
      })
      .catch((error) => {
        console.error("Search failed:", error)
      })
    petrisorionel
    @petrisorionel
    Hello, can you help me with this? I try to install the latest version
    test.spec.js "before each" hook: Before for "Try to login with a incorect user":
    Cannot read property 'url' of undefined
    I see that was a defect released in 1.0.1 - Codeception/CodeceptJS#528
    thomashaenig
    @thomashaenig
    Hi, i inserted an Issue for nightmare (#1311), can you please take a look at this. i realy like to contribute something to this project.
    Nikos
    @quantuminformation
    I came hear because night-watch has just one owner and no gitter room
    can anyone compare their exp with both nightmare and nightwatch?
    A Coleman
    @AshCoolman
    Just trying out nightmare. I can easily get goto, type, wait etc working. But click will not work. Is it because Im using. ReactJS perhaps?
    (just checking)
    Davide De Gennaro
    @dege88
    @AshCoolman I also got problems with clicking in react apps, try executing your code in your browser (faster debug) and try to use various ways to invoke the click event (I can't remember exactly which one I used)
    jokyme
    @jokyme
    hi
    can i run nightmare as a webview inside electron?
    jokyme
    @jokyme
    anybody here?
    jokyme
    @jokyme
    大家好
    doriansavage
    @doriansavage
    hi
    someone here ?
    after npm install I got Cannot find module "nightmare"
    running "node example.js"
    Davide De Gennaro
    @dege88
    did you use the command npm install nightmare?
    doriansavage
    @doriansavage
    yes I did
    its ok now after -g
    but when I run the script nothin happen
    image.png
    image.png
    doriansavage
    @doriansavage
    I was expecting see "Don!" or errors...
    Davide De Gennaro
    @dege88
    @doriansavage did you init your module?
    npm init
    Also try starting with a known example like: https://github.com/segmentio/nightmare/blob/master/example.js
    doriansavage
    @doriansavage
    I tried but same
    I just created a fresh debian server on digitalOcean
    @dege88 :)
    ls
    oups
    new folder
    npm init
    npm install nightmare
    nano example.js
    node example.js
    => no outputs... :sa:
    doriansavage
    @doriansavage
    :(
    jokyme
    @jokyme
    :worried:
    Davide De Gennaro
    @dege88
    @doriansavage which OS are you using?
    doriansavage
    @doriansavage
    its solved
    smth regarding HEADLESS etc
    it was vps Debian
    Davide De Gennaro
    @dege88
    great
    doriansavage
    @doriansavage
    nightmare is working but I get also this ...
    sh: 0: getcwd() failed: No such file or directory
    any ideas ?
    doriansavage
    @doriansavage

    no because I'm just runing "node example.js"
    in the .then callback I console.log('scrapping success');
    and my console output is :

    scrapping success
    sh: 0: getcwd() failed: No such file or directory