Are there any plugins or extensions based on VS Code or browsers that can help us effectively obtain the selector of the target?

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.

Library : Browser

Hope this helps

Hi Hugo,

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.

Dave.

The best option for these sort of cases: talk to devs or manager and force them to add data-testid’s :wink:

2 Likes

Hi!,

Recently I tried to use this one to check if it may be help for less-familiar RF users in out project:

https://pypi.org/project/robotframework-browser-recorder/

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.

BR

2 Likes