-
Notifications
You must be signed in to change notification settings - Fork 69
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
If you use a fixture that runs for a while, and use the pytest-playwright fixture, the fixture opens an empty browser early, and just sits there #155
Comments
That's probably expected as the
To add more information, even fixtures of the same scope, pytest probably wouldn't guarantee their order. But in this case, playwright fixture probably are instantiated at a higher priority than user defined fixtures. https://docs.pytest.org/en/7.1.x/how-to/fixtures.html#yield-fixtures-recommended |
Yup sounds expected, closing by that. Don't have long run fixtures, make them fast like Playwright is! |
Software is complicated, sometimes, I have to do A TON of API setup to drop the browser right in place. It is a reality that people are dealing with legacy software, and it pays to have a long running fixture vs refactoring TONS of code to make it more testable/easier to test...that may be the long term plan, but in the meantime, this is the world we live in, with long fixtures... I thought I think it would be possible to do this if I defined a custom |
I feel you bro, I have similar setup - loads of test data goes through API calls before actual page navigation starts, and the browser still opens first - hanging around and waiting until all the setup is done. Maybe some of the pytest hooks can be used for that? |
I will reopen for now, since the following prints page1 first and the page2.
|
The text was updated successfully, but these errors were encountered: