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

feat: introduce BrowserType.name() #732

Merged
merged 1 commit into from
Jan 29, 2020

Conversation

aslushnikov
Copy link
Collaborator

@aslushnikov aslushnikov commented Jan 29, 2020

This helps a lot to produce nice logging:

const { chromium, webkit } = require('playwright');

(async () => {
  for (const launcher of [chromium, webkit]) {
    console.log(`Testing on ${launcher.name()}`);
    const browser = await launcher.launch();
    // ...
    await browser.close();
  }
})();

This helps a lot to produce nice logging:

```js
const { chromium, webkit } = require('playwright');

(async () => {
  for (const browser of [chromium, webkit]) {
    console.log(`Testing on ${browser.name()}`);
    const browser = await browser.launch();
    // ...
    await browser.close();
  }
})();
```
@aslushnikov aslushnikov merged commit ce7c8d7 into microsoft:master Jan 29, 2020
@aslushnikov aslushnikov deleted the browser-type-name branch January 29, 2020 02:09
sand4rt pushed a commit to sand4rt/playwright that referenced this pull request Dec 21, 2022
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants