Skip to content

Conversation

@rexTexTau
Copy link

New extension for IPage and IFrame:
◼️ WaitForElementsRemovedFromDOMAsync (handy to wait for spinner to disappear etc)

New extension for IElementHandle:
◼️ ClickAtRandomPointAsync (useful in case of need to emulate a click in detailed manner)

@rexTexTau rexTexTau changed the title Some useful extensions from my provate codebase Some useful extensions from my private codebase Dec 17, 2024
@rexTexTau rexTexTau changed the title Some useful extensions from my private codebase WaitForElementsRemovedFromDOMAsync for Page and IFrame; ClickAtRandomPointAsync for IElementHandle Dec 17, 2024
@hlaueriksson
Copy link
Owner

Nice to see that someone actually use this.

I haven't maintained this project for a while, so I took the time to bump PuppeteerSharp:

@hlaueriksson
Copy link
Owner

There are probably more extension methods that could be added to IFrame.

@hlaueriksson
Copy link
Owner

@rexTexTau Nice contributions ❤️

Could you add tests for the new methods?

@rexTexTau
Copy link
Author

@rexTexTau Nice contributions ❤️

Could you add tests for the new methods?

Probably. I'll check it out. Adding tests for ClickAtRandomPointAsync seems to be not a very good idea, but as for WaitForElementsRemovedFromDOMAsync - it'll be nice to cover this method by tests.

@rexTexTau
Copy link
Author

rexTexTau commented Jan 2, 2025

@rexTexTau Nice contributions ❤️

Could you add tests for the new methods?

Added test methods for WaitForElementsRemovedFromDOMAsync. See commits 65802a9 and 48df96b

@rexTexTau
Copy link
Author

There are probably more extension methods that could be added to IFrame.

I totally agree, but have no time to do that job at the moment.
Best case IMO: IFrame extension methods reflect IPage extension methods.

@hlaueriksson
Copy link
Owner

I published a release out of courtesy to the users of this project; https://github.com/hlaueriksson/puppeteer-sharp-contrib/releases/tag/v7.0.0

I have not used PuppeteerSharp for years. If I need to run tests in the browser, I use; https://github.com/microsoft/playwright-dotnet

The contributions in this PR should go in a v8.0.0 release, along with:

  • IFrame extensions in PuppeteerSharp.Contrib.Extensions
  • FrameObject support in PuppeteerSharp.Contrib.PageObjects
  • IFrame assertions in PuppeteerSharp.Contrib.Should

Right now I don't have the incentive to maintain this project.
Maybe you would like to take over?

@rexTexTau
Copy link
Author

I have not used PuppeteerSharp for years. If I need to run tests in the browser, I use; https://github.com/microsoft/playwright-dotnet

Thanks for recommendation, I'll play with it. Maybe it will even fit my needs better than Puppeteer.

The contributions in this PR should go in a v8.0.0 release, along with:

* `IFrame` extensions in `PuppeteerSharp.Contrib.Extensions`

* `FrameObject` support in `PuppeteerSharp.Contrib.PageObjects`

* `IFrame` assertions in `PuppeteerSharp.Contrib.Should`

Right now I don't have the incentive to maintain this project. Maybe you would like to take over?

A tempting offer, but quite a responsibility. Need some time to ponder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants