is there a problem with writing like this? How can
not get this iframe?
const puppeteer = require("puppeteer");
(async() => {
const browser = await puppeteer.launch({
devtools: true,
headless: false
});
const page = await browser.newPage();
await page.goto("https://e.qq.com/dev/index.html");
await page.click("a-sharplogin", {
delay: 1000
})
// iframebuttonwaitFor(3000)
const iframe = await page.waitForSelector("iframe[name="ui_ptlogin"]");
console.log(iframe.name()) // UnhandledPromiseRejectionWarning: TypeError: iframe.name is not a function
//
// await page.waitFor(3000);
// let iframe = await page.frames().find(f => f.name() === "ui_ptlogin");
// const unfoldButton = await iframe.$("-sharpbottom_qlogin -sharpswitcher_plogin");
// await unfoldButton.click();
})();