Closed han2015 closed 6 years ago
I have 'fixed' my issue, but i think it has small bug.
document.documentElement.outerHTML
will get itself, weird.
it works well when you parse some cleaner and lighter site.for len(browser.Output) > 0 {
fmt.Println(<-browser.Output)
}
will continue to researching that. after all, compare to some other chrome tools, this is most lightly and easily, very practical tool.
Make sure that you empty that browser.Output
channel fully and wait for chrome to write all the console message it is going to write between your commands. It may have "old" data in it's queue. I think you can do something like:
for len(browser.Output) > 0 {
<- browser.Output
}
my config: i used the chrome canary
I got this error on Mac OS. it seems the browser didn't start up in headless.
but i remove
headless
from args, the chrome could open a window right now."--headless"