filmov
tv
Playwright Beginner Tutorial 10 | Slow Motion and Video Recording
Показать описание
T I M E S T A M P S ►
00:00 *Intro*
00:52 *How to run tests in Slow Motion | How to Record Video*
Step 1 - Open config file and add option for slow motion and video recording
const config = {
use: {
video: 'on',
launchOptions:{
slowMo: 1000
}
slowMo slows down Playwright operations by the specified milliseconds
video:
'on' - Record video for each test
'off' - Do not record video
'retain-on-failure' - Record for each test, but remove from successful test runs
'on-first-retry' - Record only when retrying a test for the first time
Step 2 - Save & Run
Step 3 - Check Video files will appear in the test-results folder
Note - SlowMo is a field in Class BrowserType.LaunchOptions
08:23 *Screenshot moment*
09:39 *How to set video recording and slow motion from test (Browser Context)*
In Playwright we can create isolated incognito browser sessions using browser context
10:34 *Create a new test*
// Launch browser
// Create a new incognito browser context
// Create a new page inside context.
// Dispose context once it's no longer needed.
13:49 *Set configurations for slow motion and video recording at test level*
Step 1 - Create a test and create browser context
Step 2 - Add options for Slow Motion in browser
Step 3 - Add options for video recording in new context
Step 4 - Close context
// launch browser
headless: false,
slowMo: 1000
})
// create a context for browser
recordVideo: {
dir: 'videos/',
size: {width:800, height: 600}
}
})
16:42 *Screenshot moment for test*
19:09 *Outro*
#playwright #tutorial
▬▬ RAGHAV PAL ▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can
If my work has helped you, consider helping any animal near you, in any way you can
NEVER STOP LEARNING
Raghav Pal
00:00 *Intro*
00:52 *How to run tests in Slow Motion | How to Record Video*
Step 1 - Open config file and add option for slow motion and video recording
const config = {
use: {
video: 'on',
launchOptions:{
slowMo: 1000
}
slowMo slows down Playwright operations by the specified milliseconds
video:
'on' - Record video for each test
'off' - Do not record video
'retain-on-failure' - Record for each test, but remove from successful test runs
'on-first-retry' - Record only when retrying a test for the first time
Step 2 - Save & Run
Step 3 - Check Video files will appear in the test-results folder
Note - SlowMo is a field in Class BrowserType.LaunchOptions
08:23 *Screenshot moment*
09:39 *How to set video recording and slow motion from test (Browser Context)*
In Playwright we can create isolated incognito browser sessions using browser context
10:34 *Create a new test*
// Launch browser
// Create a new incognito browser context
// Create a new page inside context.
// Dispose context once it's no longer needed.
13:49 *Set configurations for slow motion and video recording at test level*
Step 1 - Create a test and create browser context
Step 2 - Add options for Slow Motion in browser
Step 3 - Add options for video recording in new context
Step 4 - Close context
// launch browser
headless: false,
slowMo: 1000
})
// create a context for browser
recordVideo: {
dir: 'videos/',
size: {width:800, height: 600}
}
})
16:42 *Screenshot moment for test*
19:09 *Outro*
#playwright #tutorial
▬▬ RAGHAV PAL ▬▬
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
Every LIKE & SUBSCRIPTION gives me great motivation to keep working for you
You can support my mission for education by sharing this knowledge and helping as many people as you can
If my work has helped you, consider helping any animal near you, in any way you can
NEVER STOP LEARNING
Raghav Pal
Комментарии