login('username', 'password')
async function login(nightmare, user, pass) {
await nightmare
.type('#login_username', user)
.type('#login_password', pass);
return nightmare;
}
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)
})
npm init