microsoft / microsoft/playwright

[Feature]: "Pick locator" should respect Playwright launch configuration (maximize window / viewport settings)

Open
#40,147 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

P3-collecting-feedback
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.