Skip to content

[BUG] Clicking on a button is not working when there is a hidden button with the same selector before it. #2927

Closed

Description

Context:

  • Playwright Version: 1.2.0
  • Operating System: Mac
  • Node version: v12.6.0
  • Browser: Chromium
  • Extra: Jest

Code Snippet

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

(async () => {
  const browser = await chromium.launch();
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.click('text=Log in')
})();

Describe the bug
When there are 2 button on the page with text "Log in", but 1 is visible and the other is not, it waits for the first selected button to become visible instead of clicking the visible one.

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

Metadata

Assignees

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