I’ve been experimenting and using the awesome GoQuery package ( https://godoc.org/github.com/PuerkitoBio/goquery ) for scraping web pages. It’s really wonderful for that. However I would very much like to use Go for some browser automation work too.
I can very easily, in GoQuery retrieve a web page and select, for example a button. I can extract the text from the button and so on, thats simple. How could I, from within Go, then execute the Click() event on that button. This is possible of course in jQuery : https://api.jquery.com/click/
I can see no easy way to execute that click event. Any thoughts or advice greatly appreciated. I am aware of the Selenium implementation for Go but was hoping that there would be a lighterweight possibility based on GoQuery.
Thanks for your interest. The goal would be to drive browser journeys to test web applications by logging in, navigating around, making selections from standard UI elements and ultimately hitting back end components.
I know there are other ways to do this (such as selenium) but driving or extending the GoQuery package feels like it would result in a light, fast solution if only there were options for interacting with the pages once selected and validated. Eg sending clicks, setting values in controls and so on.