Chromedp is used for browser automation. I try to get windows title on gmail inbox page after it was opened.
For some reason the title is empty. What am I doing wrong?
```
...
var title string
err := chromedp.Run(taskCtx,
...
chromedp.WaitVisible(`body`), // gmail inbox page was opened in browser
chromedp.Title(&title),
)
if err != nil {
if err.Error() == "context deadline exceeded" {
log.Println(err) // this line executed
} else {
log.Fatal(err)
}
}
log.Printf("success.\ntitle: %s\n", title) // title is empty!
```
The output in console:
2019/10/22 08:01:49 context deadline exceeded
2019/10/22 08:01:49 success.
title: