nightmare icon indicating copy to clipboard operation
nightmare copied to clipboard

Calling Page Objects

Open charnary opened this issue 6 years ago • 0 comments

Hi all,

I'm trying to call a page object function, I've tried:

        await nightmare.evaluate(function (callback) {
            document.getElementById("g-recaptcha-response").innerHTML = response;
            eval(callback);
        }, callback).then(console.log)

In other frameworks such as Puppeteer, I could use .evaluate("string here"), any way possible with Nightmare?

Ty

charnary avatar Apr 27 '19 11:04 charnary