-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
51 lines (45 loc) · 1.34 KB
/
playwright.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { defineConfig, devices } from '@playwright/test';
export default defineConfig({
workers: 3, // Increase the number of workers for parallel execution
// Directory where tests are located
testDir: './src/tests',
// Global timeout for each test
timeout: 60 * 1000,
// Global configuration for all projects
use: {
baseURL: "https://www.automationexercise.com",
headless: false,
video: 'on', // Record video during tests
trace: 'off', // Trace generation for debugging
screenshot: 'only-on-failure', // Take screenshot only on failure
launchOptions: {
headless: false,
slowMo: 50 // Slow down the tests to make debugging easier
}
},
// Reporter configuration (moved out of projects)
reporter: [
['html', { outputFolder: 'reports/playwright-report' }],
],
// Static Projects configuration for each browser
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'], // Use the device configuration specific to Chromium
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'], // Use the device configuration specific to Firefox
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'], // Use the device configuration specific to WebKit (Safari)
},
},
],
});