Blog

What is Intelligent Object Identification?

Published on
July 7, 2022
Tessa McDaniel
Marketing Team Lead

Intelligent Object Identification is one of those processes that is going to make your authoring life easier. But how?

Functional UI test automation lives and dies by its ability to identify and reidentify objects in the user interface (UI). There are a few different methods you can use for identifying objects, and each has its advantages and disadvantages. However, Intelligent Object Identification (believe me, I wish this phrase had an official acronym) can make the process of test authoring so much faster, so let's take a look at how it does that.

Identifying an Object Traditionally

There are a few ways that objects have been identified before the onset of Intelligent Object Identification. And these can be any onscreen objects: buttons, text fields, dialog boxes, iframes, check boxes, drop-down fields; anything. One of those ways is object-based identification, where the tools delve into the underlying code. Let's take the top right of this page where there's a button where you can "Book a Demo" (which you can see an image of below). By using the Inspect feature on my browser, I can find out that the CSS selector of that button is "c-nav-demo-cta w-nav-link" which doesn't exactly roll off the tongue (of course, which attribute is actually used depends on the nature of the application and the testing). It's also likely to cause tests to break when IDs, selectors, or other attributes change, but this can be mitigated by having testable code or test engineers that know which attribute is best to use. There's also the chance that the tool can't always find the element if the selection element needs updating for either new or legacy text.

Another way to identify an object is image-based identification. This process takes a snapshot of the screen and uses it to compare against future test runs. This way, the tool has an image of the object, and it can also use the pixel location to find it. With this method, if the object changes color or shifts slightly, perhaps as the result of an addition of another object, the tool often struggles to find it again. However, this method is user-centric, as it solely focuses on the UI. That said, issues can arise from the disconnect from the code; the tool gets no information about the element, just the way it looks. 

What is Intelligent Object Identification?

Now moving to Intelligent Object Identification. This smart identification process can, well, intelligently identify which element you're looking for based on an object description: Book a Demo.  But it's not just looking for the text; that wouldn't be efficient or bug-proof. When the identification program finds an object, it dives into the DOM and collects all the selectors, IDs, and attributes to build a model of the element. It's hard to predict which attribute is going to change, so Virtuoso’s Intelligent Object Identification takes all of them. 

Virtuoso's Object Identification

Virtuoso works with an improved version of object-based identification by using what we call a hint. "What's a hint?", you say? Let's look at it from the perspective of two people in a Zoom meeting. Person A is sharing their screen and Person B is trying to tell them a certain button to click on. "See that button that says 'Book a Demo'?" That’s a simple description of exactly what the button says.

Let's go continue with the Zoom call. What if Person A just can't find that darned button? "The button on the top right; that one right next to the 'Log In' button!" Well, you can do the same thing in Virtuoso. With Natural Language Programming (NLP), you can specify that a button is on the top right of something. Check out the image above- you have the option of adding a position in the selector options if you don't feel like writing it into the test step. Well, do you want to see Virtuoso's Intelligent Object Identification in action? Try booking a demo with us to see how it works!

Subscribe to our Newsletter