Relative Content

Tag Archive for playwright

bug on download a zip when the a tag contains download attribute with value true

im trying to download a zip file with the code:
async downloadZipFile( ) {
await this.thankYouBtn.waitFor( { state: ‘attached’ }, { timeout: 5000 } );
const downloadPromise = this.page.waitForEvent( ‘download’, { timeout: 10000 } );
await this.closeOneTrustCookiePopup();
await this.thankYouBtn.click();
const download = await downloadPromise;
await download.saveAs( ‘.’ + download.suggestedFilename() );
}

Maximize browser viewport in Playwright

Is there a nicer way to maximize browser in Playwright like it has in other frameworks – browser.maximize() or page.maximize() instead of setting the viewport? Or is there one that is going to come soon with a newer version?

How do I locally flake Playwright tests

Lately I get a lot of intermittent pipeline failures in Playwright for webkit. I don’t really want to spend the time on pushing up to the pipeline to view something I could see on my own computer if only I could reproduce the conditions.

Can I get the status and steps of Each test cases in playwright in after Each?

test.beforeAll(async () => { test.setTimeout(90000); browser = await chromium.launch(); context = await browser.newContext(); // Create a new page in the context page = await context.newPage(); const login = new LoginPage(page); await login.goto(data.devurl); await login.loginapplication(data.username, data.password); }); This is my beforeAll and I never logout and continue the same browser for all the test cases with […]