I've tried almost anything but still unable to insert username after clicking input. I know there is other solutions to do so without clicking I also tried but still not working...
Click is working and cursor blinking now all I need is just to 'type' something.
const puppeteer = require('puppeteer');
const creds = {
email: "myemail",
password: "mypassword",
};
(async () => {
const browser = await puppeteer.launch({headless: false, args: ['--start-maximized']});
const page = await browser.newPage();
//set viewport
await page.setViewport({
width: 1920,
height: 1080,
})
await page.goto('https://qa.traffilog.co.il/new_web/index.htm', {waitUntil: 'networkidle0'});
const username = await page.$x('/html/body/div[1]/div/div[1]/div/div[2]/div/div[1]/div/div[2]/div/div[3]/div/div[1]/div/div/div/div/div/div[2]/div/div[1]/div/input[1]');
await username[0].click();
await page.waitForNavigation({ waitUntil: 'networkidle0' });
await page.type(username, creds.email);
await page.waitForNavigation({ waitUntil: 'networkidle0' });
// await browser.close();
})
();