I'm using chromedp to navigate thru the website, to download PDF files which are generated by the system. It takes a while, to generate them so... Code looks like that:
chromedp.Navigate("https://website.com/with/report/to/download"),
// wait for download link
chromedp.WaitReady("a.downloadLink"),
chromedp.Click("a.downloadLink"),
// wait some time to pull the file
chromedp.Sleep(time.Minute),
chromedp.Click("#close-button"),
Right now I'm waiting a minute, and then close the browser, but I don't like it that way. If there is any way to control or get some kind of "event" when file download is finished?