Skip to content

Commit e3b06e0

Browse files
author
George Griffiths
committed
fix readme linkks
1 parent 69a5db2 commit e3b06e0

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Build Status](https://travis-ci.org/Georgegriff/query-selector-shadow-dom.svg?branch=master)](https://travis-ci.org/Georgegriff/query-selector-shadow-dom) [![npm version](https://badge.fury.io/js/query-selector-shadow-dom.svg)](https://badge.fury.io/js/query-selector-shadow-dom) [![codecov](https://codecov.io/gh/Georgegriff/query-selector-shadow-dom/branch/master/graph/badge.svg)](https://codecov.io/gh/Georgegriff/query-selector-shadow-dom)
1+
[![Build Status](https://travis-ci.org/Georgegriff/query-selector-shadow-dom.svg?branch=main)](https://travis-ci.org/Georgegriff/query-selector-shadow-dom) [![npm version](https://badge.fury.io/js/query-selector-shadow-dom.svg)](https://badge.fury.io/js/query-selector-shadow-dom) [![codecov](https://codecov.io/gh/Georgegriff/query-selector-shadow-dom/branch/main/graph/badge.svg)](https://codecov.io/gh/Georgegriff/query-selector-shadow-dom)
22
# query-selector-shadow-dom
33
querySelector that can pierce Shadow DOM roots without knowing the path through nested shadow roots. Useful for automated testing of Web Components e.g. with Selenium, Puppeteer.
44

@@ -31,6 +31,7 @@ querySelectorDeep(".dropdown-item:not([hidden])");
3131
## API
3232
- querySelectorAllDeep - mirrors `querySelectorAll` from the browser, will return an `Array` of elements matching the query
3333
- querySelectorDeep - mirrors `querySelector` from the browser, will return the `first` matching element of the query.
34+
- collectAllElementsDeep - collects all elements on the page, including shadow dom
3435

3536
Both of the methods above accept a 2nd parameter, see section `Provide alternative node`. This will change the starting element to search from i.e. it will find ancestors of that node that match the query.
3637

@@ -121,21 +122,21 @@ const { locatorStrategy } = require('query-selector-shadow-dom/plugins/webdriver
121122
- Safari pretty much doesn't work, not really a surprise.
122123

123124
There are some webdriver examples available in the examples folder of this repository.
124-
[WebdriverIO examples](https://github.com/Georgegriff/query-selector-shadow-dom/blob/master/examples/webdriverio)
125+
[WebdriverIO examples](https://github.com/Georgegriff/query-selector-shadow-dom/blob/main/examples/webdriverio)
125126

126127
### Puppeteer
127128

128129
There are some puppeteer examples available in the examples folder of this repository.
129130

130-
[Puppeteer examples](https://github.com/Georgegriff/query-selector-shadow-dom/blob/master/examples/puppeteer)
131+
[Puppeteer examples](https://github.com/Georgegriff/query-selector-shadow-dom/blob/main/examples/puppeteer)
131132

132133
### Playwright
133134

134135
Update: as of Playwright v0.14.0 their CSS and text selectors work with shadow Dom out of the box, you don't need this library anymore for Playwright.
135136

136137
Playwright works really nicely with this package.
137138

138-
This module exposes a playwright `selectorEngine`: https://github.com/microsoft/playwright/blob/master/docs/api.md#selectorsregisterenginefunction-args
139+
This module exposes a playwright `selectorEngine`: https://github.com/microsoft/playwright/blob/main/docs/api.md#selectorsregisterenginefunction-args
139140

140141
```javascript
141142
const { selectorEngine } = require("query-selector-shadow-dom/plugins/playwright");
@@ -148,7 +149,7 @@ const playwright = require('playwright');
148149
await page.waitForSelector('shadow=#no-downloads span', {timeout: 3000})
149150
```
150151

151-
For a full example see: https://github.com/Georgegriff/query-selector-shadow-dom/blob/master/examples/playwright
152+
For a full example see: https://github.com/Georgegriff/query-selector-shadow-dom/blob/main/examples/playwright
152153

153154

154155
### Protractor

protractor.conf.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports.config = {
55
SELENIUM_PROMISE_MANAGER: false,
66
directConnect: true,
77

8-
// https://github.com/angular/protractor/blob/master/docs/timeouts.md
8+
// https://github.com/angular/protractor/blob/main/docs/timeouts.md
99
allScriptsTimeout: 110000,
1010

1111
specs: [ './test/protractor-locator.e2e.js', ],

0 commit comments

Comments
 (0)