Skip to content

Commit 815a303

Browse files
committed
Add info about selectors option
1 parent e977362 commit 815a303

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ You can specify a `jest-playwright.config.js` at the root of the project or defi
7676
- `webkit` Each test runs Webkit.
7777
- `device` <[string]>. Define a [device](https://github.com/microsoft/playwright/blob/master/docs/api.md#browsertypedevices) to run tests into. Actual list of devices can be found [here](https://github.com/Microsoft/playwright/blob/master/src/deviceDescriptors.ts)
7878
- `exitOnPageError` <[boolean]> Exits page on any global error message thrown. Defaults to `true`.
79+
- `selectors` <[array]>. Define [selector](https://github.com/microsoft/playwright/blob/v0.11.1/docs/api.md#class-selectors). Each selector must be an object with name and script properties.
80+
Usage with [query-selector-shadow-dom](https://github.com/Georgegriff/query-selector-shadow-dom):
81+
`jest-playwright.config.js`:
82+
83+
```javascript
84+
const {
85+
selectorEngine,
86+
} = require('query-selector-shadow-dom/plugins/playwright');
87+
88+
module.exports = {
89+
selectors: [
90+
{name: 'shadow', script: selectorEngine}
91+
],
92+
...
93+
}
94+
95+
```
7996

8097
**Note**:
8198

0 commit comments

Comments
 (0)