-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathlinkedin.js
36 lines (30 loc) · 994 Bytes
/
linkedin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/**
* Arquivo: demo-05/linkedin.js
* Data: 14/06/2021
* Descrição: arquivo responsável por realizar a demo automatizando posts no Linkedin
* usando o Playwright
* Autora: Glaucia Lemos
* Twitter: <@glaucia_lemos86>
*/
const { chromium, webkit, devices } = require("playwright");
(async () => {
const browser = await chromium.launch({ headless: false });
const context = await browser.newContext({
recordVideo: {
dir: "./video-recording",
size: {
width: 1920,
height: 1080,
},
},
});
const page = await context.newPage();
await page.goto(
"https://www.linkedin.com/login/pt?fromSignIn=true&trk=guest_homepage-basic_nav-header-signin"
);
await page.fill('input[type="text"]', "");
await page.fill('input[type="password"]', "");
await page.click('button[data-litms-control-urn="login-submit"]');
//TODO: Agora vamos fazer um postagem automatizada no Linkedin usando o Playwright:
// await browser.close();
})();