Reputation: 9617
I have this code:
nightmare
.goto('https://xxxdsfdx.com')
.type('#ap_email', '[email protected]')
.type('#ap_password', 'passsword')
.click('#signInSubmit')
.wait('#report-wrapper')
.click('.a-tab-heading:nth-child(7)')
.evaluate(() => document.querySelector('.a-box-inner'))
.then(console.log)
.catch((error) => {
console.error('failed:', error);
});
I want to console.log contents of .a-box-inner
div
How do I do this?
Upvotes: 1
Views: 849
Reputation: 9617
I should put innerHTML
.evaluate(() => document.querySelector('.a-box-inner')).innerHTMl
Upvotes: 1