You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[BUG]When using browser from beforeAll the recorded video is not attaching to the final HTML report even though videos is kept on in config file
#33720
Open
mitrananda opened this issue
Nov 21, 2024
· 0 comments
import { test } from '@playwright/test';
import { GLOBAL_VARIABLES } from '../../Utility/ENVIRONMENT_VARIABLES.js';
import { login } from '../../Pages/UserCredentials.js';
test.describe(' App Tests', () => {
let page, context;
// Before all tests, login once
test.beforeAll(async ({ browser }) => {
context = await browser.newContext();
page = await context.newPage();
// After all tests, close the page
test.afterAll(async () => {
await page.close();
});
test ('creating app ', async ({ }, testInfo) =>
{
test.setTimeout(100000)
// Navigate to Apps
await page.click('#userMenu');
//The user clicks on the "Create App" button to initiate the app creation process.
await page.locator("//span[normalize-space()=' Apps']").click();
When using browser from beforeAll the recorded video is not attaching to the final HTML report even though videos is kept on in config file
Note:
I see someone raising this issue and confirmed it as bug, what is the bug fix u r giving please let me know
https://stackoverflow.com/questions/78170953/playwright-is-not-generating-videos-when-we-create-our-own-context
code:
import { test } from '@playwright/test';
import { GLOBAL_VARIABLES } from '../../Utility/ENVIRONMENT_VARIABLES.js';
import { login } from '../../Pages/UserCredentials.js';
test.describe(' App Tests', () => {
let page, context;
// Before all tests, login once
test.beforeAll(async ({ browser }) => {
context = await browser.newContext();
page = await context.newPage();
await page.goto(GLOBAL_VARIABLES.baseURL);
await page.waitForLoadState('networkidle');
await login(page, GLOBAL_VARIABLES.username, GLOBAL_VARIABLES.password);
});
// After all tests, close the page
test.afterAll(async () => {
await page.close();
});
test ('creating app ', async ({ }, testInfo) =>
{
test.setTimeout(100000)
// Navigate to Apps
await page.click('#userMenu');
//The user clicks on the "Create App" button to initiate the app creation process.
await page.locator("//span[normalize-space()=' Apps']").click();
const generateRandomAppName = () =>
Questions_${Math.floor(Math.random() * 1000) + 1}
;let appName = generateRandomAppName();
const appDescription = 'This is an exam for Java';
await page.getByTestId('createapp.button').click();
});
});
The text was updated successfully, but these errors were encountered: