This recipe introduces
webpage.evaluate, which provides us with a hook into the context and content of the web page we have requested, including ways to inspect and manipulate the DOM. The cornerstone for many of the recipes that lie ahead will be
To run this recipe, we will need a script that loads a web page, and we will need a callback function to
webpage.open that expects to work with the content of the HTTP response.
The script in this recipe is available in the downloadable code repository as
chapter03. If we run the provided example script, we must change to the root directory for the book's sample code. Lastly, for this example to work, we will ...