How to Speed Up the Selenium Test Process?
One of the most basic things we spend time in writing UI automation is locators. Finding the right and unique locator is important for UI automation. When we click the element with the Chrome feature, the copy menu that comes up often cannot provide us with a proper selector. We spend time making a unique and short selector with changes in it.
Now let’s meet with Selectors Hub.
SelectorsHub helps to improve XPath and CSS selectors writing skills. With a selector you are looking for, auto-suggestion, you can find it much faster and more accurately.
SelectorsHub is a chrome plugin. You can add chrome from here. Let’s start trying.
Easily Search
- After adding Chrome, we open dev tools and select SelectorsHub as shown in the figure below. Now we can search and select our elements correctly.
- Let’s search for elements that have a simple <a> tag. One of its most beautiful features is that it highlights the elements it finds with the frame.
Auto-Suggestions
Now let’s see what’s included in the auto-suggestions features.
- After selecting the element, when you start typing XPath or CSS-Selector, it offers you the XPath or CSS-Selectors that you can use for that element with the auto-suggestion method. You can easily see the example below.
- Auto-Suggestions are not limited to this. We are experiencing the index problem in UI automation a lot. With auto-suggestion, you can easily find the correct index of the element you are looking for.
Error Messages for the Missing Element
You wrote automation and you think your element is correct, but there is something you missed. You can double-check with SelectorsHub.
- When you copy and paste the Xpath you think is wrong, it immediately shows you what the error is.
Other Supports
- SelectorsHub is not limited to XPath and CSS-selector. Extra support for SVG, IFrame, shadowDom is also available.
In addition to these, you can easily use it in browsers such as Firefox, Edge, Opera.
Thank you for this nice tool 👏