Moe Ali
Moe Ali

Reputation: 15

how to select span with specific email attribute value with Puppeteer

using Puppeteer trying to search in my email page for recent emails that contain specific ("email" in my case) attribute or by the text value at least

<span  email="[email protected]" name="Moon">Moon</span>

Upvotes: 0

Views: 196

Answers (1)

heychez
heychez

Reputation: 648

Using $:

const ele = await page.$('span[email="[email protected]"]');

Upvotes: 1

Related Questions