Puppeteer

is there a problem with writing like this? How can
not get this iframe?
clipboard.png


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();
})();
Jul.22,2021

your picture is different from the code?


        // iframebuttonwaitFor(3000)
        // iframe
        await page.waitForSelector('iframe[name="ui_ptlogin"]');
        // frame childFrames
        const frame = page.mainFrame().childFrames()[0];
        // frame.waitForpage.waitFor
        await frame.waitFor("-sharpbottom_qlogin -sharpswitcher_plogin");
        
        const button = await frame.$("-sharpbottom_qlogin -sharpswitcher_plogin");

        await frame.click("-sharpbottom_qlogin -sharpswitcher_plogin");
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be595d-30f11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be595d-30f11.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?