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

Add --timeout option #47

Merged
merged 3 commits into from
Mar 28, 2022
Merged

Add --timeout option #47

merged 3 commits into from
Mar 28, 2022

Conversation

palewire
Copy link
Contributor

Crafted this little add while exploring #46

@palewire palewire changed the title Added --timeout option Add --timeout option Mar 21, 2022
@simonw
Copy link
Owner

simonw commented Mar 21, 2022

I hadn't seen this option before: https://playwright.dev/python/docs/api/class-browsercontext#browser-context-set-default-timeout

This setting will change the default maximum time for all the methods accepting timeout option.

It looks like .screenshot() is indeed one of those methods: https://playwright.dev/python/docs/api/class-page#page-screenshot

I hadn't realized screenshot had a default of 30 seconds already, that's useful to know.

@palewire
Copy link
Contributor Author

It would be nice to work this in. I think it could also help clarify that wait is for after the page loads.

@palewire
Copy link
Contributor Author

Hitting 30 second timeouts on some lower quality websites. Not sure if the option to let them wait longer before timing out would fix my problem, but I'd advocate for this PR so I can give it a try.

https://github.com/palewire/news-homepages/runs/5692715786?check_suite_focus=true

@simonw simonw merged commit 712e70b into simonw:main Mar 28, 2022
simonw added a commit that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants