# noPlaywrightWaitForSelector

Rule `biome/noPlaywrightWaitForSelector`. Disallow using `page.waitForSelector()`.

- Source: biome
- Technologies: Testing
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1926 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `style/noPlaywrightWaitForSelector` | no | unsafe | group style, since 2.4.2 | [docs](https://biomejs.dev/linter/rules/no-playwright-wait-for-selector/) |

## Code examples

### Incorrect: the rule reports this

```js
await page.waitForSelector('.submit-button');
```

```js
await page.waitForSelector('#dialog', { state: 'visible' });
await page.click('#dialog .button');
```

### Correct: the rule accepts this

```js
await page.locator('.submit-button').click();
```

```js
await expect(page.locator('#dialog')).toBeVisible();
```

```js
const button = page.getByRole('button', { name: 'Submit' });
await button.click();
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "style": {
        "noPlaywrightWaitForSelector": "error"
      }
    }
  }
}
```

## Related rules

- [biome/noPlaywrightWaitForNavigation](https://lintradar.dev/rules/biome/noPlaywrightWaitForNavigation.md): Disallow using `page.waitForNavigation()`.
- [biome/noPlaywrightWaitForTimeout](https://lintradar.dev/rules/biome/noPlaywrightWaitForTimeout.md): Disallow using `page.waitForTimeout()`.
- [biome/noPlaywrightUselessAwait](https://lintradar.dev/rules/biome/noPlaywrightUselessAwait.md): Disallow unnecessary `await` for Playwright methods that don't return promises.
- [biome/noProcessGlobal](https://lintradar.dev/rules/biome/noProcessGlobal.md): Disallow the use of `process` global.
- [biome/noPlaywrightPagePause](https://lintradar.dev/rules/biome/noPlaywrightPagePause.md): Disallow using `page.pause()`.
- [biome/noPseudoElementInFunctionalPseudoClass](https://lintradar.dev/rules/biome/noPseudoElementInFunctionalPseudoClass.md): Disallow pseudo-elements inside `:is()`, `:where()`, `:not()` and `:has()`.

---

Web page: https://lintradar.dev/rules/biome/noPlaywrightWaitForSelector. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
