chromedp.TextContent is used to retrieve the text content of a web page element. When the element is not present, the program cannot proceed and remains stuck at this point.
yyil80 opened this issue · comments
yyil80 commented
If the element "page-root" does not exist, there will be no error, and "testVal" will not be printed.
err := chromedp.Run(ctx,
chromedp.TextContent("#page-root", &testVal),
)
if err != nil {
fmt.Println(err)
}
fmt.Println("testVal=", testVal)
What should I do?