Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vitalics/playwright-angular-selectors

Angular selectors engine for playwright
https://github.com/vitalics/playwright-angular-selectors

angular playwright selector-engine selectors

Last synced: 23 days ago
JSON representation

Angular selectors engine for playwright

Awesome Lists containing this project

README

        

# Angular selector engine for Playwright

**!Note**: Selectors engine works only with angular non production mode.

** NOTE: ** router-outlet is not supported, since in angular it is a virtual component.

## Intallation

```bash
npm i playwright-angular-selectors
```

## Usage

```ts
import { selectors } from "playwright";
import AngularEngine from "playwright-angular-selectors";

// register
selectors.register("angular", AngularEngine);

// usage in code

const element = page.locator('angular=app-root[title="ang"]');
element.innerText(); // "Angular"
```

The usage are the same as for [React selectors](https://playwright.dev/docs/selectors#react-selectors)