Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs]: Python documentation starting point is confusing #29579

Closed
simonw opened this issue Feb 20, 2024 · 5 comments
Closed

[Docs]: Python documentation starting point is confusing #29579

simonw opened this issue Feb 20, 2024 · 5 comments
Labels
open-to-a-pull-request The feature request looks good, we are open to reviewing a PR

Comments

@simonw
Copy link
Contributor

simonw commented Feb 20, 2024

Page(s)

https://playwright.dev/python/docs/intro is the page you get if you start on https://playwright.dev/python/ and click the "docs" link - but it's not actually documentation, it's documentation for pytest-playwright.

https://playwright.dev/python/docs/library is a better starting point.

Description

This came up in a comment on Hacker News: https://news.ycombinator.com/item?id=39442273#39443071

@simonw
Copy link
Contributor Author

simonw commented Feb 20, 2024

It looks to me like this was a deliberate decision from July 2022: dcb83d9#diff-c5c1ae09b26c6442c5d15f69902a771732c57a3ebdc153cec3ccb177d941ccd3 - presumably the goal was to better match the way the Node.js library is explained on https://playwright.dev/docs/intro

While I use and enjoy pytest-playwright, my mental model of Playwright Python is that it's the best available browser automation library, independently of using it to write Pytest tests.

The simplest way of addressing this would be to add a paragraph of text at the top of https://playwright.dev/python/docs/intro that specifically links to https://playwright.dev/python/docs/library as the place to learn about using Playwright Python outside of testing.

Currently that page has a mention of the library here:

Alternatively you can use the library to manually write the testing infrastructure with your preferred test-runner

But that's still giving the impression that Playwright is primarily a testing tool, as opposed to a general purpose browser automation tool.

@fireattack
Copy link

I agree. To me it's not even about what the tool is for, more about the flow of a doc/tutorial, and how intuitive it is.

For any lib, naturally (new) users want to learn about what the lib actually does before using it in the tests, even if that's the ultimate goal. Learning about how to use the tool in pytest before the tool itself sounds backwards.

@mxschmitt
Copy link
Member

The simplest way of addressing this would be to add a paragraph of text at the top of https://playwright.dev/python/docs/intro that specifically links to https://playwright.dev/python/docs/library as the place to learn about using Playwright Python outside of testing.

This sounds good from our side, happy to accept a PR for that.

@mxschmitt mxschmitt added the open-to-a-pull-request The feature request looks good, we are open to reviewing a PR label Feb 20, 2024
simonw added a commit to simonw/playwright that referenced this issue Feb 21, 2024
Refs:
- microsoft#29579

Signed-off-by: Simon Willison <swillison@gmail.com>
@simonw
Copy link
Contributor Author

simonw commented Feb 21, 2024

@mxschmitt
Copy link
Member

Addressed by #29590. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-to-a-pull-request The feature request looks good, we are open to reviewing a PR
Projects
None yet
Development

No branches or pull requests

3 participants