Estoy m trying to make a puppeteer web-scraping script with javascript, that allow me to get the email of many course sellers on that site and when I try to make it click on one, it return me an error of "Evaluation failed", i
usando este ejemplo :( https://www.tutorialspoint.com/puppeteer/puppeteer_absolute_xpath.htm ), y ya probé en mi máquina y funciona, supongo que no estoy dando el camino correcto pero en el ejemplo ellos decirle que simplemente copie la ruta absoluta del elemento en el que desea hacer clic y debería funcionar. (perdón por mi pobre inglés, no es mi primer idioma) De todos modos, aquí está mi código:
const puppeteer = require('puppeteer'); async function robo(){ const browser = await puppeteer.launch({headless:false, defaultViewport: false}); const page = await browser.newPage(); await page.goto('https://app-vlc.hotmart.com/market/search?categoryId=25&page=1&userLanguage=PT_BR'); await page.type('[data-test-id="login-email"]', 'my e-mail') await page.type('[data-test-id="login-password"]', 'my password') await page.click('[data-test-id="login-submit"]') await page.waitForTimeout(7000) await page.click("/html/body/div[2]/div[1]/div[2]/main/div[2]//div/div[2]/div[3]/div[1]")[0] await page.waitForTimeout(4000) //obtain URL after click console.log(await page.url()) } //browser.close(); //await browser.close(); robo();```