Skip to content

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

docs(test-parameterize): use absolute dotenv import (#31149)

Max Schmitt34dac6523cea
diff --git a/docs/src/test-parameterize-js.md b/docs/src/test-parameterize-js.md
index a2e7075f52..e6cc791207 100644
--- a/docs/src/test-parameterize-js.md
+++ b/docs/src/test-parameterize-js.md
@@ -216,8 +216,8 @@ import { defineConfig } from '@playwright/test';
import dotenv from 'dotenv';
import path from 'path';
-// Read from default ".env" file.
-dotenv.config();
+// Read from ".env" file.
+dotenv.config({ path: path.resolve(__dirname, '.env') });
// Alternatively, read from "../my.env" file.
dotenv.config({ path: path.resolve(__dirname, '..', 'my.env') });