[Feature Request]: Ability to Resize the "Browser"
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.7k
- Forks
- 538
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 8
Description
There doesn't seem to be a way to resize the browser for screenshots.
Per the Playwright docs, it should be possible to pass arguments into visit() to do this, but it doesn't seem to work. Additionally, this only works on the initial visit() and can't be done after the fact.
Dusk allows you to call $browser->resize($width, $height) at any time, this can be important when trying to screenshot an element as per #1481
It seems like this is possible in the Playwright docs, but I can't figure out the API to do it via Pest.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing Pest's browser visit() integration and comparing its available arguments with the Playwright viewport documentation. Check how browser sessions are created and determine what is needed to support resizing after the initial visit; done means callers can resize the browser at any time for screenshots, including the use case described in #1481.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, playwright
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100