checkly / headless-recorder

Chrome extension that records your browser interactions and generates a Playwright or Puppeteer script.
https://checklyhq.com/headless-recorder
MIT License
15.03k stars 722 forks source link

Support for iframe click events #12

Closed jokerslab closed 6 years ago

jokerslab commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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.

crellison commented 5 years ago

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 commented 5 years ago

I don't think that it was ever implemented.

tnolet commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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

tnolet commented 5 years ago

Please contribute either a triage/analysis if what is going wrong or a fix for the bug if this is a high priority item for you.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Raza notifications@github.com Sent: Friday, April 12, 2019 11:33 AM To: checkly/puppeteer-recorder Cc: Tim Nolet; Mention Subject: Re: [checkly/puppeteer-recorder] Support for iframe click events (#12)

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/checkly/puppeteer-recorder/issues/12#issuecomment-482507603, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADoHKxktBMkp7eUXGoifPR9CE2swQMj9ks5vgFLSgaJpZM4WEhV2.

rationalthinker1 commented 5 years ago

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