Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression]: Tests fails in parallel run when click on dropdown options performed #30399

Closed
mikhail-shafigullin opened this issue Apr 17, 2024 · 3 comments · Fixed by #30461
Closed

Comments

@mikhail-shafigullin
Copy link

Last Good Version

1.30

First Bad Version

1.31 and above, up to 1.43

Steps to reproduce

Browser: Firefox

  1. Clone repository https://github.com/mikhail-shafigullin/pw-bug from branch playwright-43
  2. npm install -> npx playwright install
  3. npm run test:e2e:local for local and npm run test:e2e:ci in Github Actions
  4. Some runs will be failed in parallel build

Expected behavior

All runs are successful.

Actual behavior

Some runs have an error that they didn't find option button. Some runs have an error that they didn't find text in select after click on option.
Test Run: https://github.com/mikhail-shafigullin/pw-bug/actions/runs/8722579714

Additional context

This issue is a copy of issue on Playwright 1.41: #29096
My repository is a copy of the repository of topic starter from this issue.
Repository: https://github.com/mikhail-shafigullin/pw-bug

Environment

System:
    OS: macOS 13.5.2
    CPU: (10) arm64 Apple M1 Pro
    Memory: 58.45 MB / 32.00 GB
  Binaries:
    Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: 1.43.0 => 1.43.0
@yury-s
Copy link
Member

yury-s commented Apr 17, 2024

сс @aslushnikov

@aslushnikov
Copy link
Collaborator

Indeed I can easily repro!

Turns out Juggler's focused page emulation is faulty and lets tabs to blur.

The reproduction:

import { firefox } from '@playwright/test';

const browser = await firefox.launch({
  executablePath: process.env.FFPATH,
  headless: false
});

async function run(id, page) {
  console.log('start', id);
  for (let i = 0; i < 10; i++) {
    await page.locator('.multiselect__select').click();
    await page.locator('li.multiselect__element').filter({ hasText: 'Option 3' }).click();
  }
  console.log('done', id);
}

const page1 = await browser.newPage();
await page1.goto('https://ilia-krivonosov.github.io/dropdown/');
const page2 = await browser.newPage();
await page2.goto('https://ilia-krivonosov.github.io/dropdown/');

await Promise.all([
  run('page1', page1),
  run('page2', page2),
]);
await browser.close();

@mikhail-shafigullin
Copy link
Author

@dgozman Hello
Is it fixed? Will it be in the next playwright release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants