Skip to content

Commit 3e3c3c6

Browse files
committed
fix(doc): fix authenticate example in doc
1 parent 9b8fb07 commit 3e3c3c6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ const anotherBrowser = await launch({ wsEndpoint: browser.wsEndpoint() });
144144

145145
```ts
146146
// Open a new page
147-
const page = await browser.newPage(
148-
"https://httpbin.org/basic-auth/user/passwd",
149-
);
147+
const page = await browser.newPage();
150148

151149
// Provide credentials for HTTP authentication.
152-
await page.authenticate({ username: "user", password: "passwd" });
150+
const url = "https://postman-echo.com/basic-auth";
151+
await page.authenticate({ username: "postman", password: "password" });
152+
await page.goto(url, { waitUntil: "networkidle2" });
153153
```
154154

155155
## BYOB - Bring Your Own Browser
@@ -205,8 +205,8 @@ await browser.close();
205205
> workarounds, see
206206
> https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
207207
208-
The following shell can remove AppArmor restrictions on user namespaces so that
209-
Puppeteer can launch Chrome without the "No usable sandbox!" error (Refer
208+
The following command removes AppArmor restrictions on user namespaces, allowing
209+
Puppeteer to launch Chrome without the "No usable sandbox!" error (see
210210
[puppeteer#13196](https://github.com/puppeteer/puppeteer/pull/13196)):
211211

212212
echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns

0 commit comments

Comments
 (0)