Understanding Playwright's Selector Detection and Locator Generation
How Playwright Detects Selectors
...
Implemented in files like:
packages\playwright-core\src\server\injected\consoleApi.ts
packages\playwright-core\src\server\injected\recorder\recorder.ts
packages\playwright-core\src\server\injected\selectorGenerator.ts
packages\playwright-core\src\server\injected\injectedScript.ts
Playwright's Locator Generation: Integration and Complexity
It's important to note that we cannot easily extract Playwright's locator generation functionality for use in a custom recorder. Here's why:
...