hanayashiki / playwright-react-selector-fixture

Issue fixture: cannot match direct HTML element of React components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Playwright React Selector Fixture

Steps to reproduce the bug:

  1. Clone this repository
git clone git@github.com:hanayashiki/playwright-react-selector-fixture.git
cd playwright-react-selector-fixture
  1. Install dependencies
yarn
  1. Leave the dev server running
yarn dev
  1. In another terminal, run
yarn playwright test
  1. Wait for timeout exceeded
    Test timeout of 30000ms exceeded.

    locator.waitFor: Target closed
    =========================== logs ===========================
    waiting for locator('_react=App').locator('div')
    ============================================================

       7 |   await page.goto("http://localhost:5174/");
       8 |
    >  9 |   await page.locator("_react=App >> div").waitFor({ state: "attached" });
         |                                           ^
      10 | });
      11 |

About

Issue fixture: cannot match direct HTML element of React components


Languages

Language:JavaScript 60.5%Language:CSS 32.8%Language:HTML 6.6%