React

[playwright] 데스크톱/모바일 브라우저 config

Asset Type
File Type
When to use
Last edited time
2022/05/05 12:59
Created by
Reference
const { devices } = require('@playwright/test'); /** @type {import('@playwright/test').PlaywrightTestConfig} */ const config = { workers: 2, retries: 2, use: { headless: false, viewport: { width: 1280, height: 720 }, launchOptions: { slowMo: 1000, }, video:"on", }, projects: [ { name: 'Desktop Chromium', use: { browserName: 'chromium', }, }, // Test against mobile viewports. { name: 'Mobile Safari', use: devices['iPhone 12'], }, ], }; module.exports = config;
TypeScript
복사