Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce BrowserContext support #1269

Merged
merged 1 commit into from Mar 5, 2023
Merged

Conversation

ZekeLu
Copy link
Member

@ZekeLu ZekeLu commented Feb 27, 2023

A BrowserContext is similar to an incognito profile but you can have more than one. Don't get confused by the name, it has nothing to do with the Go package "context".

Two more chromedp.ContextOptions are added:

  • WithNewBrowserContext: to create a target in a new BrowserContext.
  • WithExistingBrowserContext: to create a target in an existing BrowserContext.

If the context is created with the WithNewBrowserContext option, the id of the new BrowserContext can be retrived by:

chromedp.FromContext(ctx).BrowserContextID

Fixes #1267
Fixes #1237
Updates #1193
Updates #997
Updates #799

A BrowserContext is similar to an incognito profile but you can have
more than one. Don't get confused by the name, it has nothing to do
with the Go package "context".

Two more chromedp.ContextOption's are added:

- WithNewBrowserContext: to create a target in a new BrowserContext.
- WithExistingBrowserContext: to create a target in an existing
  BrowserContext.

If the context is created with the WithNewBrowserContext option, the
id of the new BrowserContext can be retrived by:
  chromedp.FromContext(ctx).BrowserContextID
@ZekeLu ZekeLu merged commit 47cd286 into chromedp:master Mar 5, 2023
@ZekeLu ZekeLu deleted the browser-context branch March 5, 2023 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue managing downloads from multiple tabs when using a remote allocator How to modify http proxy
1 participant