playwright-community / playwright-go

Playwright for Go a browser automation library to control Chromium, Firefox and WebKit with a single API.
https://playwright-community.github.io/playwright-go/
MIT License
1.97k stars 147 forks source link

Feedback needed for future development #122

Closed mxschmitt closed 1 year ago

mxschmitt commented 3 years ago

Hello,

(upvote this https://github.com/microsoft/playwright/issues/6856 instead)

since I've joined @Microsoft we are considering moving this package over to the organisation. By that we would ensure that all features form the original Playwright project are integrate and bugs are fixed. Currently since it was a private project it got unfortunately not that much attention since my time was limited. For that we are currently evaluating what the use-cases are and how many people in which scenarios are using it.

Would be awesome if you could give us some feedback so you could help us with the decision. In more detail, answer the following questions:

Thank you!

(Thumbs up if you are interested in it)

mxschmitt commented 3 years ago

cc to some users already, thanks!

@sicko7947 @rusq @rustycl0ck @aleksandrov @yujiri8 @lkraider @applecat @abay2204 @Chimerax2 @AngangGuo @jinmao88

ghost commented 3 years ago

For what are you using Playwright for Go?

Automated tests for a web application.

Are you using it for personal use or in a company?

Company

Do you have any future plans to extend the usage in the future?

Aside from writing more tests, no.

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

Nothing comes to mind. I think the APIs are really good. One thing that bugs me though is that the docstrings seem to be automatically generated from some markdown/HTML source, as they are littered with markdown and HTML syntax. They also seem to be broken in some cases. For example, the docstring for each property in FrameTapOptionsPosition is:

    /// <summary><para></para></summary>

What other libraries did you consider instead of Playwright for Go?

Selenium, Agouti, Chromedp (we are currently using Chromedp for another purpose in the same project). All dismissed because they do not work with shadow DOM, which our app uses. Chromedp's API is also too low-level for testing to be convenient.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

Currently, local Linux dev machine. We would like to run it on FreeBSD since the production setup for our app uses FreeBSD, but playwright does not support FreeBSD :(

extrasalt commented 3 years ago

Great to hear @mxschmitt !

For what are you using Playwright for Go?

Scraping websites

Are you using it for personal use or in a company?

Work

Do you have any future plans to extend the usage in the future?

Yes. Greatly in fact

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

Many times it's unclear from reading the comments if something will return an error or just a nil as the result. ( The comment reads null; I think it is generated from playwright js ?)

What other libraries did you consider instead of Playwright for Go?

Rod

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

Kubernetes So an official Docker image will also be helpful. Right now I am copying browsers from the corresponding playwright js image so that the versions match and we don't download the browsers multiple times on container init

AngangGuo commented 3 years ago

since I've joined @microsoft we are considering moving this package over to the organization.

Great news. Congratulations.

For what are you using Playwright for Go?

Automate web applications(fill in data into forms, get data from web pages, etc.).

Are you using it for personal use or in a company?

For company

Do you have any future plans to extend the usage in the future?

Absolutely.

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

What other libraries did you consider instead of Playwright for Go?

Rod, Playwright for JS and TS.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

As a command line script or part of a web app.

sicko7947 commented 3 years ago

Good to hear that!

For what are you using Playwright for Go?

Automate test and web scraping.

Are you using it for personal use or in a company?

Personal

Do you have any future plans to extend the usage in the future?

Yes,indeed

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

Current API design looks great. But perhaps make the go version of playwright keep up to date with nodejs version, I noticed few concepts in the latest nodejs version were not found in go version, such as CDPsession, Android, Electron etc.

More customisable options that mocks automate browser behaviour more like an actual browser. Such as ability to configure options in window.navigators when context is initialised.

What other libraries did you consider instead of Playwright for Go?

ChromeDP, lorca, webview, webview2, selenium.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

Kubernetes, docker swarm and as a script.

Overall, I liked the API design and I can see the big potential under this project, playwright is the best and efficient browser automate testing library I ever used compare to other libraries I've used in the past. Keep up the good work! Thank you. @mxschmitt

rustycl0ck commented 3 years ago

Congratulations on joining Microsoft!

Overall, I feel like this is a great library and was also very useful to me to get my basic stuff done quickly.

jeroendee commented 3 years ago

@mxschmitt first off, congrats on the Microsoft gig! Super nice. Second, thank you very much for actually creating this module.

For what are you using Playwright for Go?

Driving webpages & getting to learn Go. Especially the latter function is important (to me at least). My first steps in getting to learn Java and C# years ago were by using Selenium and later WebDriver (when the projects merged). It provides a way for non-programmers to make the normally abstract stuff, less abstract, more tangible. This is a great way/opening into a new language. The results are real and immediate. A real fast payoff.

Next to that it can be of great value in the market of automation frameworks. Right now I'm moving more towards using Playwright, in order to automate browsers and inspect web applications. It can be of added value in the adoption of Playwright platform (as in an extra client library). This would give Playwright a more defining USP as opposed to for instance a Cypress framework. And maybe even the WebDriver framework, which doesn't have an official Go client library.

Of all the languages I've come across, to me Go is incredibly appealing! The whole history of the language (the heritage of the people behind it), the different direction it's heading as opposed to the constant adding of new features by the other languages (yes C# you too). The dev happiness it brings by the awesome tooling it has.

Are you using it for personal use or in a company?

Personal now and probably also in a company in the future where possible (I'm also a test automation engineer (Quality Shepherd)).

Do you have any future plans to extend the usage in the future?

Yes for sure.

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

At the moment no concrete specific API suggestion. For a version 1.0 it would be nice to match the other client libraries an a functional level.

I haven't looked at the source code that much yet (only consuming), but stuff that I would appreciate to see would be:

Also of course quality documentation.

What other libraries did you consider instead of Playwright for Go?

None.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

For now just locally as standalone (CLI) applications. But the moment it's going to get deployed in a company, probably somewhere in the k8s world.

@mxschmitt I'm not a programmer by profession, but if you need help in some way. Just let me know. I'll see what I can do.

pjcalvo commented 3 years ago

For what are you using Playwright for Go?

Are you using it for personal use or in a company?

Do you have any future plans to extend the usage in the future?

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

What other libraries did you consider instead of Playwright for Go?

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

supercom32 commented 3 years ago

Q: For what are you using Playwright for Go? A: I am using it for a personal project, but this experience will help see if playwright for Go is worth recommending for use at work for testing.

Q: Are you using it for personal use or in a company? A: Personal for now.

Q: Do you have any future plans to extend the usage in the future? A: Absolutely! One thing which really gruffs-my-chuff about Protractor/Selenium is the constant issues we have trying to match appropriate driver versions, with installed browser versions, and test library versions (Lord help us if we need to update to a new version!). Since this is a manual process, we always get miss-matched drivers, browser versions that are impossible to find (if you want them to be compatible with an older driver), and ambiguous instructions as to how to deploy them and tell your library where to find them. With Playwright-go, I was incredibly happy that all of this was fetched and done for you automatically and dynamically based on your OS setup!!!

Q: Do you have any suggestions in terms of API design and if something should be changed for version 1.0? A: Please seriously consider making the automatic downloading of drivers, browser components, and ffmpeg, a stable and reliable feature of the project. If a project decides to use a version of playwright-go, guarantee that all downloadable dependencies for it will always be present so as to not break older projects built with the library. Having a guarantee means people will never be afraid of their older projects being broken at any time (if you don't happen to have these dependencies installed), as well as makes upgrading to a new version of the library absolutely painless. In addition, people can pin a known "stable" version of playwright-go for production purposes (Without fear of downloadable dependencies disappearing), while using the bleeding edge for testing purposes. In addition, the ability to select which components get downloaded would also be cool (Ie. If you only need chromium and not Firefox or ffmpeg, no need to download them all).

Updated In addition, it would be nice if obtaining web elements "just worked" and was not impeded by psudo-elements, namespaces, or other edge-cases which need special workarounds. For example, if a page is fully loaded in the browser, it would be nice to just be able to specify an xPath to an element and have it be found regardless of status (ie. behave exactly as if the user searched for it in the browser's "Element" debug window). Currently you can only search the original DOM and anything loaded after the fact is not picked up. Maybe have an option to refresh the DOM with the latest and final changes so psudo-elements and other things loaded dynamically can be picked up?

Another suggestion would be the ability to load cookie data from a Netscape formatted cookie file easily. Since most tools export cookies in Netscape format, this would add compatibility with a wide variety of off-the-shelf cookie tools.

Q: What other libraries did you consider instead of Playwright for Go? A: Non thus far, because I really want to do all development in Go. Previously we used Protractor for NodeJS and it was an absolute nightmare from a maintenance perspective (drivers, browsers, etc). Also, nodeJS is pretty terrible as a language as well, but I digress (^_^);

Q: Where do you run it? e.g. Docker, Kubernetes, as a script etc. A: I am currently building a stand-alone application I am distributing to people to use. So it will be used at different times, for different purposes, and there is no guarantee if the user will have the dependencies required to run it. This is why Playwright-go is so attractive, because anyone at any skill level can use your app, without having to follow setup instructions or manually hunt for downloads.

mcfedr commented 3 years ago

For what are you using Playwright for Go?

Right now testing an http proxy server in written in go

Are you using it for personal use or in a company?

company

Do you have any future plans to extend the usage in the future?

Having found it, I'd like to use it in more go based projects for e2e testing

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

Havent done enough to say, but so far because of familiarity with playwright nodejs its been very easy to get started

What other libraries did you consider instead of Playwright for Go?

playwright for nodejs, and then I thought, I'd google and see if there is something similar for go, and found something very very similar :)

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

right now as a script, but will likely build it and run on GitLab CI, so containerised

AngangGuo commented 3 years ago

@mxschmitt Do you have any update about this? Can you please pin this issue at the top?

mohamedmansour commented 3 years ago

I want to evaluate whether to use this for OSS, right now the OSS team is using Selenium and I wanted to recommend Playwright, https://github.com/prysmaticlabs/prysm/pull/8981

j-fuentes commented 2 years ago

For what are you using Playwright for Go?

We wrote a simple program that exercises several use-cases continuously against production. We extract some metrics during those tests.

Are you using it for personal use or in a company?

Both.

Do you have any future plans to extend the usage in the future?

Yes. We are already relying on this, and we will likely build more tests with the same framework.

What other libraries did you consider instead of Playwright for Go?

PhantomJS, Selenium, and pure Playwright in JS.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

Kubernetes.

zimmski commented 2 years ago

For what are you using Playwright for Go?

I just heard of Playwright today and i find it more exciting than i originally thought. So i/we are not a user yet. In case this the Go bindings become officially supported, i think our company will migrate to it. Only our web frontend and IDE extensions are written in other languages. Everything else is done in Go (and Bash). So it makes a lot of sense to also move our web frontend system tests to Go.

We are currently running into lot of edge cases of TypeScript packages and Cypress. Which lead to a lot of workarounds that we want to get rid of. Also the testing tooling is nice, but a lot of nice things of the Go tooling is missing for us.

Are you using it for personal use or in a company?

We would use it then in our company if all features are equally supported with Go. Go has a good package and tooling ecosystem. So this makes IMHO a lot of sense.

Do you have any future plans to extend the usage in the future?

See above.

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

I looked through the examples of the repository and will test a little next week at work. But i am wondering how the best "go test" integration could look like. How do you have a login context over multiple test cases? how can you depend on other test cases to work first for fixtures? would it be possible to have some form of model-based testing using playwright-go?

What other libraries did you consider instead of Playwright for Go?

Currently we are using Cypress with lots of workarounds. Before that we experienced Selenium with lots of more workarounds. Both work, but working around problems that could be solved by the tool or the tooling itself is always good.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

Locally on the host under Linux, VM under Linux, Kubernetes with Docker (in VMs) that are in a CI.

troyk commented 2 years ago

For what are you using Playwright for Go?

currently using js/ts playwright for web scraping and SPA testing; use Go for most backend, the scrapers feed go programs html for parsing so a good go-playwright lib (combined with go's httptest) would be a big boost to productivity and simplicity of the codebase/stack

Are you using it for personal use or in a company?

company

Do you have any future plans to extend the usage in the future?

yes, once we can connect to existing browsers (see next comment)

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

supporting the same connectivity as the js/ts lib to existing browsers:

const browser = await chromium.connectOverCDP({
      endpointURL: "http://localhost:9222"
  }); 

What other libraries did you consider instead of Playwright for Go?

chromedp, rod and our own wrapper around mafredri/cdp; we've written ~500 of ~3000 scrapers of govt data and hit hurdles with each of the libs, as well as puppeteer, only the js/playwright has been smooth sailing.

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

docker

uthng commented 2 years ago

Very happy to find out this package and congrats for joining Microsoft.

For what are you using Playwright for Go?

Automate E2E tests and web scraping.

Are you using it for personal use or in a company?

Both

Do you have any future plans to extend the usage in the future?

Because Go eases the parallel execution, we will use to collect content of our client websites for data and ML.

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

N/A

What other libraries did you consider instead of Playwright for Go?

Playwright in JS/TS

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

CI, Docker and Kubernetes.

Hope that you continue to work and maintain this great package. Thanks for your works.

SamHennessy commented 2 years ago

For what are you using Playwright for Go?

Full-stack testing for a system that uses WebSockets

Are you using it for personal use or in a company?

Personal

Do you have any future plans to extend the usage in the future?

Yes

Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

For testing, if I get an error I just want the test to fail so I write wrappers like

func FatalOnErr(t *testing.T, err error) {
    t.Helper()

    if err != nil {
        t.Fatal(err)
    }
}

func Click(t *testing.T, pwpage playwright.Page, selector string) {
    t.Helper()

    FatalOnErr(t, pwpage.Click(selector))
}

So something to help with this would be nice, but it's not a big deal.

What other libraries did you consider instead of Playwright for Go?

https://github.com/chromedp/chromedp

Where do you run it? e.g. Docker, Kubernetes, as a script etc.

go test ./...

pyrossh commented 2 years ago

For what are you using Playwright for Go? Testing

Are you using it for personal use or in a company? Personal

Do you have any future plans to extend the usage in the future? Yes

Do you have any suggestions in terms of API design and if something should be changed for version 1.0? None

What other libraries did you consider instead of Playwright for Go? Cypress, Testcafe, Playwrightjs but wanted to move to golang as its easier to dev with.

Where do you run it? e.g. Docker, Kubernetes, as a script etc. Local and Docker

seanmrnda commented 2 years ago

For what are you using Playwright for Go? Testing Are you using it for personal use or in a company? Personal Do you have any future plans to extend the usage in the future? Yes, it's an amazing library for browser automation. Do you have any suggestions in terms of API design and if something should be changed for version 1.0? not much but I hope we will have more maintainers and contributors for this project. What other libraries did you consider instead of Playwright for Go? None Where do you run it? e.g. Docker, Kubernetes, as a script etc. I just run it on my daily driver for study purposes.

pjcalvo commented 2 years ago

@mxschmitt Are u still considering maintaining this project? I moved into a new company and my team is mostly Go based, I would love to have pw integrated in one of our repos but that would be possible only if it is on GO, since the team won't appreciate having mixed stacks.

jdfergason commented 2 years ago

This is a great project - hopefully it becomes an official repo!

1) For what are you using Playwright for Go?

Web automation

2) Are you using it for personal use or in a company?

personal

3) Do you have any future plans to extend the usage in the future?

yes, I plan to start using for automated testing. Also plan on introducing to my company

4) Do you have any suggestions in terms of API design and if something should be changed for version 1.0?

No, API is already very nice.

5) What other libraries did you consider instead of Playwright for Go?

chromedp

Didn't use because it was not stable

6) Where do you run it? e.g. Docker, Kubernetes, as a script etc.

Docker

antoniocanas commented 2 years ago
pranc1ngpegasus commented 1 year ago

hey, any updates?

mxschmitt commented 1 year ago

Closing since the upstream issue was unfortunately closed and there is as of today no interested in maintaining this project by the Playwright team.

mclarkex commented 1 year ago

Late to the party, but we are considering picking up development of the Go branch of Playwright. We have the resources to commit staff to its maintenance and development.

I'll update this post once we've made a decision.

mxschmitt commented 1 year ago

@mclarkex great news! Happy to answer questions / help with onboarding.

davixcky commented 1 year ago

Any update on this? @mclarkex

canstand commented 1 year ago

Hi @mxschmitt , please take a look at #352 if you have time, thanks.

canstand commented 11 months ago

Hi @mxschmitt, could you please assign me the "Triage" permission so I can help manage issues?

mxschmitt commented 11 months ago

@canstand done!

sam-ulrich1 commented 6 months ago

@canstand @mxschmitt Assuming a competent and versatile skill set, how long do you expect it to:

  1. Take to get familiar with the go client codebase as well as the necessary concepts from playwright
  2. Take to update the client to a new release once familiar

I am interested and have reviewed some commits for updates but I want a better understanding of the workload. I'd be doing it on my own, this would not be org backed.

optimuspaul commented 4 months ago

Are you still looking for maintainers? or does the README need to be updated?

canstand commented 3 months ago

Now there is not much workload to follow the upstream core function upgrade. But I don't have complex end-to-end testing scenarios, so anyone with similar experience and needs is welcome to come along.