Skip to content

[BUG] Frames show up wrong on Firefox after navigating #1235

@help-14

Description

@help-14

Context:

  • Playwright Version: 0.11.1
  • Operating System: Windows
  • Extra: Nodejs 12.14.1

Code Snippet

This is the test code:

const {chromium, firefox} = require('playwright');

async function RunTest(browserName, browser){
  	const context = await browser.newContext();
  	const page = await context.newPage();

	await page.goto('https://ebanking.vietinbank.vn/rcas/portal/web/retail/bflogin');
	
	let loginFrame = page.frames()[1];
	await loginFrame.fill('#txtUsername', 'my_username');
	await loginFrame.fill('#txtPassword', 'xxxxxxxxxxxxx');
	await loginFrame.click('.sign-in');
	await page.waitFor(15000);

	let topFrames = page.frames().length;
	let childFrame = page.frames()[0].childFrames().length;
	console.log(browserName+ ": top frame: " + topFrames + ", child frame: " + childFrame);
	
	await browser.close();
}

(async () => {
	const browser = await chromium.launch();
  	await RunTest('Chromium', browser);
})();

(async () => {
  const browser = await firefox.launch();
  	await RunTest('Firefox', browser);
})();

Describe the bug

After navigating, the number of frames and childFrames are all wrong. The test will return:

Chromium: top frame: 2, child frame: 1
Firefox: top frame: 1, child frame: 0

I can see the second frame on firefox's inspector:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions