Skip to content
Advertisement

Passing Variable to page.evaluate() function

I’m trying to pass a variable I am using in my code into page.evaluate function, but it’s console.logging as it’s not defined and creating errors for my code.

JavaScript

I get the following error: (node:3210) UnhandledPromiseRejectionWarning: Error: Evaluation failed: ReferenceError: putterID is not defined

Advertisement

Answer

Update: I need to pass putterID in like this:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement