Ranorex Selocity is a free Chrome DevTools extension that simplifies the creation of robust and reliable selectors for web automation. It supports multiple selector strategies, including CSS, XPath, Link Text, and RanoreXPath, making it an invaluable tool for automation engineers working with Selenium, WebDriver.io, Protractor, and other frameworks.
Below, is a description of some of the key features of Ranorex Selocity:
- Smart Selector Generation: Automatically generates unique selectors, intelligently ignoring dynamically generated IDs to enhance stability.
- Multiple Selector Strategies: Supports CSS, XPath, Link Text, and RanoreXPath for versatile automation needs.
- DevTools Integration: Seamlessly integrates into Chrome DevTools, allowing for in-context selector generation and editing.
- Instant Feedback: Highlights matching DOM elements and displays the count, facilitating quick validation.
- Dark Mode Support: Offers a dark theme to reduce eye strain during extended use.
- RanoreXPath Compatibility: Works in conjunction with RanoreXPath for enhanced object recognition and shorter, more stable selectors.
Installation
- Open the Ranorex Selocity Chrome Web Store page.
- Click Add to Chrome to install the extension.
- Once installed, open Chrome DevTools (F12 or right-click and select Inspect).
- Navigate to the "Selocity tab within DevTools to start using the extension.
Using Ranorex Selocity
Generating Selectors
- Open Chrome DevTools and select the Selocity tab.
- Click the element in the webpage for which you want to generate a selector.
- Selocity displays a list of selector options (CSS, XPath, Link Text, RanoreXPath).
- Click the Copy button next to the desired selector to copy it to your clipboard.
- Paste the copied selector into your test automation code.
Editing Selectors
- In the Selocity tab, select the element and view the generated selectors.
- Click a selector to edit it manually.
- As you edit, Selocity provides instant feedback by highlighting matching elements and displaying the count.
Configuration Options
- Click the ⚙️ in the top-right corner of the Selocity tab to access settings.
- Available options include:
- Ignore Dynamic IDs
- Automatic Escaping
- Element Highlighting
- Allow Partial class-name
- Produce Minimal Target Selectors
- Theme Selection
Best Practices
- Selector Strategy: Choose the selector type that best fits your application's structure and stability requirements.
- Dynamic Content: Utilize the Ignore Dynamic IDs option to prevent flaky selectors caused by dynamic attributes.
- Validation: Always validate selectors by checking the highlighted elements and matching the count in Selocity.