configure playwright to use remote chrome debugging
This commit is contained in:
@@ -2,6 +2,7 @@ import { defineConfig, devices } from '@playwright/test';
|
|||||||
|
|
||||||
const baseURL = process.env.BASE_URL || 'http://127.0.0.1:3000';
|
const baseURL = process.env.BASE_URL || 'http://127.0.0.1:3000';
|
||||||
const webServerURL = process.env.WEB_SERVER_URL || baseURL;
|
const webServerURL = process.env.WEB_SERVER_URL || baseURL;
|
||||||
|
const chromeDebuggingPort = process.env.CHROME_DEBUGGING_PORT || '9222';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
testDir: './tests',
|
testDir: './tests',
|
||||||
@@ -13,11 +14,17 @@ export default defineConfig({
|
|||||||
use: {
|
use: {
|
||||||
baseURL,
|
baseURL,
|
||||||
trace: 'on-first-retry',
|
trace: 'on-first-retry',
|
||||||
|
launchOptions: {
|
||||||
|
args: [`--remote-debugging-port=${chromeDebuggingPort}`],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
projects: [
|
projects: [
|
||||||
{
|
{
|
||||||
name: 'chromium',
|
name: 'chromium',
|
||||||
use: { ...devices['Desktop Chrome'] },
|
use: {
|
||||||
|
...devices['Desktop Chrome'],
|
||||||
|
channel: 'chrome',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
webServer: {
|
webServer: {
|
||||||
|
|||||||
Reference in New Issue
Block a user