puppeteer-sharp icon indicating copy to clipboard operation
puppeteer-sharp copied to clipboard

Feature Request: Implement Interfaces for Browser/Page classes

Open danbopes opened this issue 3 years ago • 4 comments

When prototyping projects, especially for testing, it would be a lot nicer if Page implemented an IPage with all of it's main methods/events. I could then mock up my own page class (With something like Moq) which I could create my own implementation to return specific data, or track how many times methods get called. Right now, this isn't really possible with PuppeteerSharp.

danbopes avatar Mar 26 '22 06:03 danbopes

I think I would review a PR with this change. It would be quite massive thought.

kblok avatar Apr 17 '22 23:04 kblok

+1 an IBrowser interface would be awesome for the Browser object, so I can mock it during unit testing

brnbs avatar May 08 '22 08:05 brnbs

I've created #1965 which extracts most of the public API into interfaces. Anyone interested please provide feedback there.

amaitland avatar May 19 '22 00:05 amaitland

Hey guys Any news on the topic?

pthomaz avatar Aug 29 '22 22:08 pthomaz