Вот пример кода
const puppeteer = require('puppeteer')
async function login(){
const browser = await puppeteer.launch({
headless: false
});
const page = await browser.newPage();
page.setDefaultNavigationTimeout(100000);
await page.goto(url, {
waitUntil: 'networkidle2'
});
await page.waitForSelector("[name='login[username]");
await page.type("[name='login[username]']", "talenttop044@gmail.com");
await page.waitForSelector("[name='login[password]");
await page.type("[name='login[password]']", "D&6^XM#8<]Vn_mjh");
await page.keyboard.down("Tab");
await page.keyboard.down('Enter');
await page.waitForNavigation();
}
Надеюсь, это поможет вам. Привет