XPath and CSS Selector Generator | Ranorex Selocity Chrome Extension

Your Smart Selector Generator

Boost your efficiency and generate Selenium CSS selectors as well as XPath selectors with the free Ranorex Selocity Chrome extension.

Ranorex Selocity
Logo Ranorex Webtestit
Ranorex Webtestit
A lightweight IDE optimized for building UI web tests
Logo Ranorex Webtestit

Join the open beta for Ranorex Webtestit – A lightweight IDE optimized for building UI web tests with Selenium or Protractor that works hand-in-hand with Ranorex Selocity

Tired of constructing unique selectors?

Your page under test changes. The selector location fails. Fixing fragile selectors is a time-consuming chore. We get it: manually constructing unique selectors is difficult, slow and prone to errors – and makes writing rock-solid Selenium locators nearly impossible. There is always uncertainty whether the chosen selector accurately and reliably identifies an element. It’s time to stop the guessing game.

find selenium css selectors and chrome xpath selectors
Selector generator for locators in Selenium WebDriver

Generate robust and reliable selectors

Ranorex Selocity is a free extension for the Chrome DevTools that instantly provides unique and robust selectors for your web page. The smart selector generator ignores dynamically generated IDs. Feedback on the selectors helps you identify the most stable way to locate an element. Once you have decided on a generated selector, it just takes a click to copy and paste it into your locators in Selenium tests – or use it in any other framework that depends on selectors finding DOM elements, such as WebDriver.io and Protractor.

Effortlessly improve the quality of selectors

Generate, edit, and evaluate RanoreXPath, CSS, link text and XPath selectors.

Modify RxPath selectors

Easy selector modification

You can further edit and evaluate selectors in our Chrome DevTools sidebar panel. Ranorex Selocity auto-detects the selector type, highlights it, and then displays the number of matching DOM elements. This provides you with instant feedback on the uniqueness of a selector.

Create unique selectors

Unique RanoreXPath selector

Aside from generating CSS, link text and XPath selectors, Ranorex Selocity also provides RxPath selectors. Based on the XPath query language, RanoreXPath utilizes the award-winning Ranorex object recognition methodology, making selectors shorter and more robust against changes.

Feedback on the GitHub repository

Your feedback is welcome

We want to know how you enjoy working with Ranorex Selocity! Simply go to our GitHub repository and drop your feedback, feature requests, or issues you may have found when using our Chrome browser extension. We’d love to know what you think of it!

Fast selector creation for locators in Selenium

Speed up the Selenium test creation process

Reduce time creating selectors for locators in Selenium and concentrate on what really matters.

Most time is spent before the first line of code is even written: from finding your way through the page to determining proper targets. Save that valuable time for coding! Simply right-click on the element in your page to instantly retrieve its various selector types and copy it to your clipboard for instant use for E2E testing. Ranorex Selocity even adds quotes automatically when pasting the selector in your tests to make every second count!

Key benefits of Ranorex Selocity

Automatic generation of quality selectors directly in the Chrome DevTools panel.

Fast selector creation

Instant selector generation

Generate robust and reliable RanoreXPath, XPath, link text, and CSS selectors with Ranorex Selocity. It just takes a click to instantly copy and paste it into your Selenium locator. Of course, quotes are automatically added to the selector, ready for immediate use in tests.

Edit selectors

Exploratory selector creation

Put your own stamp on selectors – because you know your page the best! Directly in our Chrome DevTools sidebar panel, you can edit selectors to further improve speed, readability, and reliability. The integrated selector checker instantly verifies its uniqueness.

Ranorex Selocity dark theme

Dark theme

Your favorite dev tools have it. Your favorite text editor has it. Let’s face the facts: the dark theme is essential. That’s why we’ve included a dark theme in Ranorex Selocity and made sure to maintain the look and feel of the Chrome DevTools. We can’t wait to see you on the dark side!

Integrates directly with Ranorex Webtestit

Maximize your efficiency with Ranorex Webtestit, a lightweight IDE optimized for test automation with Selenium or Protractor.  Spend less time on tedious tasks such as setup and boilerplate code. Let Ranorex Webtestit handle the setup process for you, including scaffolding of a test framework and automatic download of the necessary WebDrivers.  Develop tests in Java or Typescript, and Webtestit generates the native Selenium or Protractor code for you. Save development time with automatic application of page object patterns, built-in code snippets, useful keyboard shortcuts and intelligent code completion. Test all popular browsers or a headless browser on your local machine, distribute tests on a Selenium grid or to cloud-based providers. 
Logo Ranorex Webtestit
Ranorex Webtestit
A lightweight IDE optimized for building UI web tests

Frequently asked questions

How does Ranorex Selocity support me in developing my Selenium test automation project?
By auto-generating CSS, link text, XPath, and RanoreXPath (RxPath) selectors, Ranorex Selocity tremendously boosts your efficiency. Now, you can obtain selectors with one click, and copy them into your locators in Selenium.  If you choose to modify a selector yourself, Ranorex Selocity provides instant feedback to ensure the selector is valid.
How do I use Ranorex Selocity?
Ranorex Selocity is a Google Chrome browser extension that integrates seamlessly into your workflow. It can be installed from the Chrome Web Store and can be accessed in the Chrome DevTools. It then appears as additional option on your action menu.
What locator strategy does Ranorex Selocity support?
Ranorex Selocity generates a list of selectors for each element that you click on a website. The list displays all selector types that Selenium supports:
  1. CSS
  2. XPath
  3. Link text
  4. RanoreXPath (RxPath)
In addition to the selector definition, Ranorex Selocity displays the number of matching elements for the selector, along with action buttons to copy and modify the selector.  If you hover over the selectors, you can see the matched elements on the website.
What are the benefits of selector generation?
Ranorex Selocity attempts to generate a selector that matches one element and is robust. To do so, Ranorex Selocity follows these principles:
  • Depend on the HTML structure of the page as little as possible
  • Prefer “data-oriented” elements and attributes to “layout-oriented”
  • Do not use dynamic IDs
  • Prefer more specific attributes and classes
How can I create or modify a selector?
Use the evaluation box in Ranorex Selocity to create and modify selectors. You can either write a selector from scratch, or click the Modify button to edit one of our generated selectors. Press Enter to evaluate your selector. Ranorex Selocity highlights the matched elements found. To choose the best selector for the element, Ranorex Selocity allows you to easily iterate through the matched elements.
How can I copy a selector?

There are two ways to copy a selector:

  • Right-click on an element on your website and select the fast copy option from the context menu.
  • Perform the copy action using the Copy button in the Ranorex Selocity tab.
How can I access configuration options?

Configuration options are available by clicking on the symbol on the top right of Ranorex Selocity. Here you can whether you want to ignore automatically generated IDs in the selector generation, use automatic escaping, and many more.

What is RanoreXPath (RxPath)?

The generated RanoreXPath (RxPath) simplifies the XPath and provides additional attributes and operators, making the resulting selector shorter and more robust against changes. To be able to use the RxPath in your Selenium WebDriver tests, you have to install a new Selenium locator that will be provided by a Ranorex open source project in the near future. Sign up for the beta program to get availability information and samples.

How can I give feedback to Ranorex Selocity?

Have you found a bug in Ranorex Selocity? Are you missing a feature? Let us know! Pop over to our GitHub repo and drop your feedback. We truly value your opinion.