I want puppeteer to click on a mail (mail1a.de), after signing up somewhere else. So i have to wait for the "verification" email. I've tried clicking on the Mail when it's already on the mail account (this works), but when i'm refreshing the page while i'm waiting for the mail,it won't let me click on it after it appears. (the mail is the first "element" in the email list)
Here is how i set up Puppeteer
const browser = await puppeteer.launch({headless:false})
const page = await browser.newPage()
await page.setViewport({ width: 930, height: 1000 })
await page.goto(url1)
return page;
}
Here is my refresh function
async function refresh(page){
await page.goto("https://mail1a.de/?search=" + EmailPrefix)
await page.waitFor(2000)
try {
await page.click('.well > .table > tbody > #mmm4789 > td:nth-child(1)')
} catch (e) {
await page.waitFor(3000)
await refresh(page)
}
}
I hope someone can help me :)
PS: i also tried using xpath but it also didn't work, and since i've seen it the field i want to click on is also not in an iframe. Idk what i'm doing wrong