Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot get iframe element in youtube page #5471

Closed
dinggewennuan opened this issue Mar 2, 2020 · 3 comments
Closed

cannot get iframe element in youtube page #5471

dinggewennuan opened this issue Mar 2, 2020 · 3 comments

Comments

@dinggewennuan
Copy link

Steps to reproduce

Tell us about your environment:

What steps will reproduce the problem?
i want got email in this page,but when i clicked VIEW EMAIL ADDRESS ,the page insert a new iframe,but i can got it used every ways

image

image

Please include code that reproduces the issue.

`async function test2 () {
const browser = await puppeteer.launch({
headless: false,
devtools: true,
defaultViewport: {
height: 1024,
width: 1280
}
})

const page = await browser.newPage();

await page.goto('https://www.youtube.com/channel/UC-3fLOkTRb7-tepOqxsDdDg/about', {
    timeout: 0,
    waitUntil: 'networkidle0'
})
try {        
     await page.click('#details-container > table > tbody > tr:nth-child(1) > td:nth-child(2) > ytd-button-renderer > a')

    let iframes = await page.frames()
    // console.log("iframe  ", iframes)
    // await page.waitForSelector("#recaptcha-anchor")
    // await page.waitForSelector('#captcha-container iframe');
    // await page.waitForSelector('#captcha-container > form > button'
    let iframe = await page.frames().find(f => f.name())
   // cannot got everything
    for (const frame of page.mainFrame().childFrames()) {
        console.log("url is", frame.url(), frame.title())
        console.log("-------name------",frame.name())
    }
    
    await page.close();
    await browser.close();
    console.log("end--------------")
} catch (error) {
    console.log("error is ", error)
}

}`
What is the expected result?
i hope got the final email
image

What happens instead?

@devjerry
Copy link
Contributor

check out #4960

@stale
Copy link

stale bot commented Jun 26, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale stale bot added the unconfirmed label Jun 26, 2022
@stale
Copy link

stale bot commented Jul 26, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

@stale stale bot closed this as completed Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants