Are there any plugins or extensions based on VS Code or browsers that can help us effectively obtain the selector of the target? Just observing through the browser’s F12 mode and trying feels very inefficient. It requires a lot of back-and-forth attempts to successfully find a suitable selector expression.
If you go to the chrome store and search “Robot Framework“ there you’ll find several, I’ve not used any of them, so I guess try a few and see which one you like best.
It works in that sense it can help you generate sketch for your test, it will extract basic locators for your elements etc. Maybe worth a try. In my case some of those generated locators are ambigious but maybe you will find this tool somehow useful.
When you want to build robust solution for CI I guess there is no other way then understanding how your app is build and what are best type of locators to use.
BTW, you write about back-and-forth attempts, I dont know how you work, but usage of DebugLibrary and checking the locators on the run is rather quick.