Documentation
¶
Overview ¶
Command eval is a chromedp example demonstrating how to evaluate JavaScript and retrieve the result. It reads a page of the local test site and needs no internet. It evaluates scripts on the reference page of the package time and decodes the results into Go values, from a number and a list of strings to a struct and a list of structs. Use -url to give the full URL of a page to read, for example a live site, and the program does not start the local site then. The selectors are written for the local site and a live site can differ. Use -v to print the protocol messages and -visible to show the browser window and leave it open. Use -visible-on-terminal to draw the page in the terminal with terminal graphics.