Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: quote to avoid variable expansion in powershell (#28728)

Yury Semikhatsky87ca45366b2c
diff --git a/docs/src/test-annotations-js.md b/docs/src/test-annotations-js.md
index ba8ae9c681..f9e8c0678c 100644
--- a/docs/src/test-annotations-js.md
+++ b/docs/src/test-annotations-js.md
@@ -79,35 +79,45 @@ test('Test full report @slow', async ({ page }) => {
You will then be able to run only that test:
-```bash
+```bash tab=bash-bash
npx playwright test --grep @fast
```
-Or if you want the opposite, you can skip the tests with a certain tag:
+```powershell tab=bash-powershell
+npx playwright test --grep "@fast"
+```
-```bash
-npx playwright test --grep-invert @slow
+```batch tab=bash-batch
+npx playwright test --grep @fast
```
-To run tests containing either tag (logical `OR` operator):
+Or if you want the opposite, you can skip the tests with a certain tag:
-```bash
-npx playwright test --grep "@fast|@slow"
+```bash tab=bash-bash
+npx playwright test --grep-invert @fast
```
-On Windows shells:
+```powershell tab=bash-powershell
+npx playwright test --grep-invert "@fast"
+```
+
+```batch tab=bash-batch
+npx playwright test --grep-invert @fast
+```
-- PowerShell
+To run tests containing either tag (logical `OR` operator):
- ```bash
- npx playwright test --grep --% "@fast^|@slow"
- ```
+```bash tab=bash-bash
+npx playwright test --grep "@fast|@slow"
+```
-- Command Prompt(cmd.exe) / Git Bash:
+```powershell tab=bash-powershell
+npx playwright test --grep --% "@fast^|@slow"
+```
- ```bash
- npx playwright test --grep "@fast^|@slow"
- ```
+```batch tab=bash-batch
+npx playwright test --grep "@fast^|@slow"
+```
Or run tests containing both tags (logical `AND` operator) using regex lookaheads: