UI libraries such as Headless UI, Radix, and AG Grid generate new element IDs on every render. page.ai already had a per-call option to stop recording ID-only selectors. Now a Playwright project can set it once for every test.
export default defineConfig({
metadata: { volatileElementIds: true },
});
volatileElementIdsdrops ID-only selectors so steps anchor on a test ID, a label, or textnoSelectorFailoverkeeps only the most specific selector- A per-call option still overrides the project default
- Applies when a step is recorded; existing cached steps keep their selectors until re-recorded