From 499a17c28e5e0e8582241f9f19b69f6a9d1186cb Mon Sep 17 00:00:00 2001 From: Yad Smood Date: Fri, 13 Jan 2023 08:42:26 +0800 Subject: [PATCH] update doc --- lib/examples/launch-managed/main.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/examples/launch-managed/main.go b/lib/examples/launch-managed/main.go index 2c5b9fba..aeb616d9 100644 --- a/lib/examples/launch-managed/main.go +++ b/lib/examples/launch-managed/main.go @@ -36,5 +36,17 @@ func main() { browser.MustPage("https://mdn.dev/").MustEval("() => document.title"), ) + // Launch another browser with the same docker container. + ll := launcher.MustNewManaged("") + + // You can set different flags for each browser. + ll.Set("disable-sync").Delete("disable-sync") + + anotherBrowser := rod.New().Client(ll.MustClient()).MustConnect() + + fmt.Println( + anotherBrowser.MustPage("https://go-rod.github.io").MustEval("() => document.title"), + ) + utils.Pause() }