Я следовал примеру Nightmarejs из GitHub на моем Mac. Когда я запускаю "node example.js", но ничего не происходит, браузер не показывает
Я делаю то же самое в Windows, все работает нормально. Кто-нибудь знает в чем проблема? что мне не хватает?
npm install --save nightmare
node example.js
//example.js file
const Nightmare = require('nightmare')
const nightmare = Nightmare({ show: true })
nightmare
.goto('https://duckduckgo.com')
.type('#search_form_input_homepage', 'github nightmare')
.click('#search_button_homepage')
.wait('#r1-0 a.result__a')
.evaluate(() => document.querySelector('#r1-0 a.result__a').href)
.end()
.then(console.log)
.catch(error => {
console.error('Search failed:', error)
})