docs: update vs code projects explanation (#31571)

This commit is contained in:
Debbie O'Brien 2024-07-05 17:37:00 +02:00 committed by GitHub
parent 1132667ffe
commit b2bda9fce2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -230,13 +230,13 @@ Running 1 test using 1 worker
✓ [firefox] example.spec.ts:3:1 basic test (2s)
```
The VS Code test runner runs your tests on the default browser of Chrome. To run on other/multiple browsers click the play button's dropdown from the testing sidebar and choose another profile or modify the default profile by clicking **Select Default Profile** and select the browsers you wish to run your tests on.
With the VS Code extension you can run your tests on different browsers by checking the checkbox next to the browser name in the Playwright sidebar. These names are defined in your Playwright config file under the projects section. The default config when installing Playwright gives you 3 projects, Chromium, Firefox and WebKit. The first project is selected by default.
<img width="1464" alt="selecting browsers" src="https://user-images.githubusercontent.com/13063165/221136731-9d4bc18f-38a4-4adb-997b-5b98c98aec7f.png" />
![Projects section in VS Code extension](https://github.com/microsoft/playwright/assets/13063165/58fedea6-a2b9-4942-b2c7-2f3d482210cf)
Choose a specific profile, various profiles or all profiles to run tests on.
To run tests on multiple projects(browsers), select each project by checking the checkboxes next to the project name.
<img width="1536" alt="choosing default profiles" src="https://user-images.githubusercontent.com/13063165/221669537-e5df8672-f50d-4ff1-96f9-141cd67e12f8.png" />
![Selecting projects to run tests on](https://github.com/microsoft/playwright/assets/13063165/6dc86ef4-6097-481c-9cab-b6e053ec7ea6)
### Run tests on different browsers
* langs: python