How do I find a locator that keeps disappearing in Chrome for a Playwright UI Test?
I know I've run into this issue many times before. It feels like I am in a race to select the element and get a glimpse of the console to actually get the element name.
This simple tip may help you keep that drop down or popup visible while interacting with it.
We will be using Chrome Dev Tools feature "Emulate a focused page". With Chrome Dev Tools Open on a Mac use [⌘ or Ctrl]+[P] Command Menu and search for
>emulate a focused page and hit Enter.
This will keep certain elements focused so they are selectable.
To try this out for yourself you can visit MDN Docs and attempt to inspect one of the search results from the search box.
Thanks @sulco for the inspiration.