Closed feeops closed 3 weeks ago
Rod Version: v0.116.0
package main import ( "github.com/go-rod/rod" "time" ) func main() { // 连接浏览器 browser := rod.New().MustConnect().Timeout(10 * time.Second) defer browser.MustClose() // 打开网页 page := browser.MustPage("https://www.baidu.com").MustWaitLoad() // 使用 defer 来确保在函数退出前执行截图操作 defer page.MustScreenshot("demo.png") time.Sleep(15 * time.Second) }
panic: context deadline exceeded
Get demo.png file
none
Please fix the format of your markdown:
45:5 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1]
generated by check-issue
Ask chatgpt about your code, it will solve it
Rod Version: v0.116.0
The code to demonstrate your question
What you got
panic: context deadline exceeded
What you expect to see
Get demo.png file
What have you tried to solve the question
none