Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Jan 13, 2023
1 parent 501e111 commit 499a17c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/examples/launch-managed/main.go
Expand Up @@ -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()
}

0 comments on commit 499a17c

Please sign in to comment.