Skip to content

GMAIL - Unable to open the latest email and click on one of the link  #11

@samathan

Description

@samathan

Hi,

I am trying to open the latest email in Gmail and click on one of the click. But I am unable to.
Here are steps using Puppeteer ,

  1. Login into GMAIL, ---- Successful
    2.Search for the "Unread email with the text"- Successful
  2. Now using xPath trying to click on the latest email but failing,
    Below is the code
    await page.waitForXPath('//[@Class="zA zE"]');
    const [emails] = await page.$x('//
    [@Class="zA zE"]');
    if(emails)
    {
    await Promise.all([
    await page.waitForNavigation(),
    emails.click()
    ])
    }
    it says TypeError: Cannot read property 'click' of undefined

Could anyone please help me with this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions