Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Support for iframe click events #12

Closed
jokerslab opened this issue Aug 20, 2018 · 11 comments · Fixed by #48
Closed

Support for iframe click events #12

jokerslab opened this issue Aug 20, 2018 · 11 comments · Fixed by #48
Assignees
Labels
🦾 enhancement New feature or request
Milestone

Comments

@jokerslab
Copy link

I would love to see support for recording events from iframes and populating the script with the appropriate frame selection.
const frames = await page.frames(); const curFrame = frames.find(f => f.name() === 'activeFrame'); await curFrame.click('#selector')

@tnolet
Copy link
Member

tnolet commented Aug 23, 2018

Hi @jokerslab Could you give a little bit more context about the what you exactly mean with "populating the script with the appropriate frame selection". I'm open to new feature suggestions, I just need a bit more about what does it do and what the expect behaviour should be.

@jokerslab
Copy link
Author

If I have an html page with multiple iframes, and I start the recorder, no click events are captured from any of the elements in the iframe. I would expect the recorder to record events from all frames within the page. Additionally, when running puppeteer the click event has to be called on the frame where the selector/element parent document is.

Thus I would imagine whenever capturing a click from an iframe, you would want to capture the name or id of the iframe so that when generating or running the script from the recorder you can call
frame.click(selector)
with the correct frame from page.frames()

@rationalthinker1
Copy link
Contributor

For example:
https://www.goodmanmfg.com/product-registration
I want to record on this page. The interactions does not record because it is in within a iframe.

@tnolet tnolet added the 🦾 enhancement New feature or request label Aug 30, 2018
@tnolet tnolet self-assigned this Aug 30, 2018
@tnolet tnolet added this to the 0.3.0 milestone Sep 4, 2018
@tnolet tnolet closed this as completed Sep 4, 2018
@crellison
Copy link

Hi @tnolet
I am trying to record events in an iframe with this as well, but the recorder doesn't capture any standard events inside the iframe I am using. Was this functionality removed since 0.3.0? Is there some other race condition I'm not aware of?

@rationalthinker1
Copy link
Contributor

I don't think that it was ever implemented.

@tnolet
Copy link
Member

tnolet commented Jan 8, 2019

@crellison this functionality is implemented. Can you give me a clear, reproducable example so I can check for any bugs? Dealing with iframes is a bit of a pain, so there might be parts not covered in the code.

@chris2kus31
Copy link

chris2kus31 commented Apr 11, 2019

@tnolet
Was this ever resolved? I am using the puppeteer recorder but there is a iframe payment form that when I selected, the recorder does not capture. Is this an issue on my side or on the recorder itself? The URL is https://giving.kcm.org/

@tnolet
Copy link
Member

tnolet commented Apr 12, 2019

@chris2kus31 resolved is a bit tricky to define. I have working examples, but things might break in unexpected ways depending on timing and the actual DOM makeup. I will have a look at your example when I get the time.

@rationalthinker1
Copy link
Contributor

@tnolet If you look at my example from last year, you would see that it still doesn't work.

@tnolet
Copy link
Member

tnolet commented Apr 12, 2019 via email

@rationalthinker1
Copy link
Contributor

@tnolet you are right. I'll look at it. My intention wasn't to demand this.

rationalthinker1 added a commit to rationalthinker1/puppeteer-recorder that referenced this issue Apr 15, 2019
rationalthinker1 added a commit to rationalthinker1/puppeteer-recorder that referenced this issue Apr 15, 2019
@tnolet tnolet modified the milestones: v0.3.0, v0.5.2 Apr 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🦾 enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants