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] playwright-chromium and playwright have different export signatures #814

Closed
pavelfeldman opened this issue Feb 3, 2020 · 0 comments · Fixed by #818
Closed

[BUG] playwright-chromium and playwright have different export signatures #814

pavelfeldman opened this issue Feb 3, 2020 · 0 comments · Fixed by #818

Comments

@pavelfeldman
Copy link
Member

There should a way to use playwright-vendor npms w/o changing the require signature:

// const { chromium } = require('playwright');
const { chromium } = require('playwright-chromium');
  
(async () => {
  const browser = await chromium.launch({ headless: false });
  const context = await browser.newContext({ viewport: null });
  const page = await context.newPage('https://visualstudio.microsoft.com/services/visual-studio-online/');
})();

currently I need to do

const chromium = require('playwright-chromium');
@pavelfeldman pavelfeldman added the v1 label Feb 3, 2020
aslushnikov added a commit to aslushnikov/playwright that referenced this issue Feb 3, 2020
This patch changes top-level exports for the vendor-specific
packages:
- `playwright-chromium`: now exports an object with a single `chromium`
field
- `playwright-wekbit`: now exports an object with a single `webkit`
- `playwright-firefox`: now exports an object with a single `firefox`

Fixes microsoft#814
aslushnikov added a commit that referenced this issue Feb 3, 2020
* feat: change vendor package exports

This patch changes top-level exports for the vendor-specific
packages:
- `playwright-chromium`: now exports an object with a single `chromium`
field
- `playwright-wekbit`: now exports an object with a single `webkit`
- `playwright-firefox`: now exports an object with a single `firefox`

Fixes #814

* fix typo

* address comments
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