WPF-Pilot / WpfPilot

https://wpfpilot.dev
Other
10 stars 5 forks source link

WebView2 Support Bounty - $1000 #10

Open ELanning opened 1 month ago

ELanning commented 1 month ago

Puppeteer can be injected into browser instances: https://pptr.dev/guides/running-puppeteer-in-the-browser

We would like to support injecting Puppeteer into a WebView2 WPF component and then control it using C# bindings.

Here is a toy example of how this could be architected: https://wpfpilot.dev/docs/custom-elements Note, that is very rudimentary and only has a few commands. We want a full fledged API that looks similar to Playwright or Puppeteer. Feel free to model the API off of either.

Reqs:

Injecting Puppeteer to control the WebView2 component is not strictly required, if there are better implementations.

omarsoufiane commented 1 month ago

hello @ELanning you can create a bounty on BountyHub if no one solves your issue, you can retract it and get your money back. we are a new startup and our community is growing day after day, I would be glad to assist you if you need any help.

ELanning commented 1 month ago

I would certainly not object if a bot posted it there for me on my behalf, but I do not have the bandwidth to post there myself. Similar to how Google automatically scrapes and categorizes the web.

omarsoufiane commented 1 month ago

@ELanning It's a simple process you just have to copy and paste the link of this GitHub issue and it will be automatically imported. However, it's mandatory that you create an account on bountyhub, because you will be the one to review the pull request and accept/decline the bounty claims made by other users.

ELanning commented 1 month ago

@aybanda I have assigned you. I'll consider you the owner of the bounty until it's completed or you cannot complete it for whatever reason.

Feel free to use: https://github.com/WPF-Pilot/WpfWebView2Sample as a starting point (has a test suite set up and a custom element skeleton).

aybanda commented 1 month ago

@aybanda I have assigned you. I'll consider you the owner of the bounty until it's completed or you cannot complete it for whatever reason.

Feel free to use: https://github.com/WPF-Pilot/WpfWebView2Sample as a starting point (has a test suite set up and a custom element skeleton).

excuse me for the inconvenience unfortunately I'm unable to takeover the issue.

ELanning commented 1 month ago

Open for anyone else then.

parthiv11 commented 1 month ago

@ELanning I would like to give it a try

ELanning commented 1 month ago

Hey parthiv11, I've assigned you. Good luck. Feel free to post here with any questions.

nabby27 commented 1 month ago

Hi @ELanning, you can create bounties also on Opire, the good thing is that you don't need to pay out until someone claims the bounty with a PR, we don't hold funds.

PS: I'm the co-founder, so if you need anything, feel free to contact me.

rahat2134 commented 2 weeks ago

@ELanning Please assign this issue to me. I have experience working in puppeteer. I have completed a full-size project of the puppeteer. Maybe you can take a look at some of them -

I am just giving some of the PR's.

I have a doc full of the whole implementation, whole workflow...

ELanning commented 2 weeks ago

@parthiv11 any objections? Were you still planning on doing this? No worries if your plate is too full at the moment.

rahat2134 commented 1 week ago

@ELanning Please let me know, I will start this after getting assigned.

ELanning commented 1 week ago

@rahat2134 will do. @parthiv11 is still working on this I believe, but if he has to drop it, you will be first on the list.

rahat2134 commented 1 week ago

I think @parthiv11 is not active..... We can wait for his reply for a few days more!

parthiv11 commented 1 week ago

I am working on this @ELanning @rahat2134, but was busy in Hacktoberfest last month.

therefore got delay in this one

rahat2134 commented 1 week ago

@parthiv11 If you feel like passing this one to me at any time, feel free to ping me. Thanks!

ELanning commented 4 days ago

UPDATE: I thought there was a version of puppeteer that could run in the browser like this:

<script src="puppeteer.js" />

But it looks like that's not the case. Either way we want an API like playwright or puppeteer that works without requiring changes to the WebView2 component (by the developer). Eg

appDriver.GetElement<WebView2Element>(x => x.Type == "WebView2").ClickElementById("#htmlIdSample")

Should "just work"

parthiv11 commented 2 hours ago

@ELanning https://github.com/ChromiumDotNet/WebView2.DevTools.Dom this could be helpful and suits what we need