Skip to content

Commit 3bda64e

Browse files
committed
feat(logging-into-a-website): remove credentials
1 parent 1471dd4 commit 3bda64e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

content/academy/puppeteer_playwright/common_use_cases/logging_into_a_website.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ await page.click('a:has-text("Sign in")');
4141
await page.waitForLoadState('load');
4242
4343
// Type in the username and continue forward
44-
await page.type('input[name="username"]', 'academy_playwright_login');
44+
await page.type('input[name="username"]', 'YOUR-LOGIN-HERE');
4545
await page.click('input[name="signin"]');
4646
4747
// Type in the password and continue forward
48-
await page.type('input[name="password"]', 'AcademyIsGreat88');
48+
await page.type('input[name="password"]', 'YOUR-PASSWORD-HERE');
4949
await page.click('button[name="verifyPassword"]');
5050
await page.waitForLoadState('load');
5151
@@ -67,11 +67,11 @@ await Promise.all([page.waitForSelector('a[data-ylk*="sign-in"]'), page.click('b
6767
await Promise.all([page.waitForNavigation(), page.click('a[data-ylk*="sign-in"]')]);
6868
6969
// Type in the username and continue forward
70-
await page.type('input[name="username"]', 'academy_playwright_login');
70+
await page.type('input[name="username"]', 'YOUR-LOGIN-HERE');
7171
await Promise.all([page.waitForNavigation(), page.click('input[name="signin"]')]);
7272
7373
// Type in the password and continue forward
74-
await page.type('input[name="password"]', 'AcademyIsGreat88');
74+
await page.type('input[name="password"]', 'YOUR-PASSWORD-HERE');
7575
await Promise.all([page.waitForNavigation(), page.click('button[name="verifyPassword"]')]);
7676
7777
// Wait for 10 seconds so we can see that we have in fact
@@ -80,7 +80,7 @@ await page.waitForTimeout(10000)
8080
</marked-tab>
8181
```
8282

83-
Great! If you're following along and nothing is wrong with the credentials, you should see that on the final navigated page, you're logged into the **Academy** Yahoo account.
83+
Great! If you're following along and you've replaced the placeholder credentials with your own, you should see that on the final navigated page, you're logged into your Yahoo account.
8484

8585
![Successfully logged into Yahoo]({{@asset puppeteer_playwright/common_use_cases/images/logged-in.webp}})
8686

@@ -289,10 +289,10 @@ await page.waitForSelector('a:has-text("Sign in")');
289289
await page.click('a:has-text("Sign in")');
290290
await page.waitForLoadState('load');
291291
292-
await page.type('input[name="username"]', 'academy_playwright_login');
292+
await page.type('input[name="username"]', 'YOUR-LOGIN-HERE');
293293
await page.click('input[name="signin"]');
294294
295-
await page.type('input[name="password"]', 'AcademyIsGreat88');
295+
await page.type('input[name="password"]', 'YOUR-PASSWORD-HERE');
296296
await page.click('button[name="verifyPassword"]');
297297
await page.waitForLoadState('load');
298298
@@ -355,10 +355,10 @@ await page.goto('https://www.yahoo.com/');
355355
await Promise.all([page.waitForSelector('a[data-ylk*="sign-in"]'), page.click('button[name="agree"]')]);
356356
await Promise.all([page.waitForNavigation(), page.click('a[data-ylk*="sign-in"]')]);
357357
358-
await page.type('input[name="username"]', 'academy_playwright_login');
358+
await page.type('input[name="username"]', 'YOUR-LOGIN-HERE');
359359
await Promise.all([page.waitForNavigation(), page.click('input[name="signin"]')]);
360360
361-
await page.type('input[name="password"]', 'AcademyIsGreat88');
361+
await page.type('input[name="password"]', 'YOUR-PASSWORD-HERE');
362362
await Promise.all([page.waitForNavigation(), page.click('button[name="verifyPassword"]')]);
363363
364364
const cookies = await page.cookies();
54.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)