We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd429f5 commit f8d01e1Copy full SHA for f8d01e1
README.md
@@ -83,10 +83,20 @@ const browser = await puppeteer.connect({
83
const context = await browser.createBrowserContext();
84
const page = await context.newPage();
85
86
+// Dump all the links from the page.
87
await page.goto('https://wikipedia.com/');
88
89
+const links = await page.evaluate(() => {
90
+ return Array.from(document.querySelectorAll('a')).map(row => {
91
+ return row.getAttribute('href');
92
+ });
93
+});
94
+
95
+console.log(links);
96
97
await page.close();
98
await context.close();
99
+await browser.disconnect();
100
```
101
102
## Build from sources
0 commit comments