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

[BUG] Documentation ambiguous for browser.contexts() #1212

Closed
thernstig opened this issue Mar 4, 2020 · 0 comments · Fixed by #1220
Closed

[BUG] Documentation ambiguous for browser.contexts() #1212

thernstig opened this issue Mar 4, 2020 · 0 comments · Fixed by #1220

Comments

@thernstig
Copy link
Contributor

Context:

  • Playwright Version: 0.11.1
  • Operating System: Linux

Code Snippet

(async () => {
  for (const browserType of ['chromium']) {
    const browser = await playwright[browserType].launch();
    console.log(browser.contexts());
    await browser.close();
  }
})();

Describe the bug

https://github.com/microsoft/playwright/blob/master/docs/api.md#browsercontexts says:

Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of BrowserContext.

However, in a newly created browser it returns an empty array.

aslushnikov added a commit to aslushnikov/playwright that referenced this issue Mar 4, 2020
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 a pull request may close this issue.

1 participant