-2
I am creating this robot to automate some tasks of the I day by day, I ask him to access the site, click the input, and then log in. He accesses the page, but he’s not clicking, I can’t find the problem. this is the code
const puppeteer = require('puppeteer');
(async () =>{
const browser = await puppeteer.launch({ headless: false });
const site = 'http://www.goolsystem.com.br';
const page = await browser.newPage();
await page.goto('http://www.goolsystem.com.br/4/Login.aspx?ReturnUrl=%2f4');
await page.waitFor('#ucTrocarModulo_btnIconeUrbano > input');
await page.click('#ucTrocarModulo_btnIconeUrbano > input');
await page.type('input[name="ucLogarUsuario$txtLogin"]','@@@@@', {delay: 100});
await page.type('input[name="ucLogarUsuario$txtSenha"]', '@@@@@', {delay: 100});
await page.keyboard.press('Enter');
await browser.close();
})();
when I run shows the following error: "(Node:5920) Unhandledpromiserejectionwarning: Unhandled Promise rejection. This error either originated by Throwing Inside of an async Function without a catch block, or by rejecting a Promise which was not handled with . (catch). To terminate the Node process on unhandled Promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(Ode:5920) [DEP0018] Deprecationwarning: Unhandled Promise rejections are deprecated. In the Future, Promise rejections that are not handled will
terminate the Node.js process with a non-zero Exit code."