microsoft / microsoft/playwright
[Feature]: "Pick locator" should respect Playwright launch configuration (maximize window / viewport settings)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 96.3k
- Forks
- 6.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
### 🚀 Feature Request
When using the "Pick locator" feature in Playwright within VS Code, the browser launched for locator selection should respect the project’s configured `use` settings, including `launchOptions` and `viewport`.
In particular, it should support launching the browser in a maximized state when configured via `launchOptions.args` (e.g. `--start-maximized`) or equivalent settings.
### Example
```
export default defineConfig({
use: {
headless: false,
launchOptions: {
args: ['--start-maximized'],
},
viewport: null,
},
});
```
When clicking "Pick locator", the expectation is that the browser opens maximized based on the above configuration.
### Motivation
The "Pick locator" feature is commonly used during test authoring to identify and select elements on complex or responsive UIs. A maximized browser significantly improves visibility and usability in these scenarios.
Currently, there is a mismatch between:
- the browser state used for locator selection, and
- the configured test execution environment
This inconsistency can slow down development and make locator selection harder, especially for layouts that rely on full viewport width or responsive behaviour.
Aligning "Pick locator" with Playwright configuration would improve consistency and reduce friction when writing and debugging tests.
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 the VS Code "Pick locator" implementation and how it launches Playwright's browser. Compare that launch path with the project's configured use settings, especially launchOptions and viewport. Done means the locator browser honors settings such as --start-maximized and viewport: null, with behavior verified for the provided configuration example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- playwright, typescript, vscode
- Domain
- developer-experience, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100