...
Modern day Web-applications usually have dynamic web elements. Finding objects with these dynamic elements is a real-pain when it comes to object identification while during Selenium-based automation testing. Attribute values of these elements change at every page load event. This change is mostly session-based. Hence, while test case execution identifying such objects while execution usually fails and so the automated test cases.
Qualitia finds a way out of it. Qualitia gives an option which resolves this problem of objects with dynamic elements. Qualitia SmartLocator automatically identifies dynamic objects during the test case execution. The SmartLocator option feature automatically modifies the locater locator value at runtime and updates it in the repository for future use. This way, Qualitia never fails to identify objects even though object locator value is getting changed after every session.
Qualitia gives you complete control over where to use this option as it can be enabled for every single object separately. This works with every desktop web object with dynamic elements which is added using Qualitia Object Spy.
...
While adding objects using Object Spy, you will see the SmartLocator option on the right-hand side corner. By default, this option is enabled for newly added objects.
Note |
---|
By default, the SmartLocator option is disabled for all the pre-existing objects. It is not recommended to enable this option for the parameterised objects. See limitations for more information |
Editing Existing Objects
While editing object details from the Objects screen of Qualitia Automation Studio, you will find this option as follows:
...
whereas, while editing objects from the Object Spy window, you will find this option on the right-hand side corner.
Info |
---|
Disabling this option, object will no longer be eligible for SmartLocator identification. Qualitia recommends you to keep SmartLocator enabled. If you wish to enable this option for this object later, you will have to perform either of the following steps for SmartLocator to work for this object:
|
Use Case-1
Let's take an example of https://in.yahoo.com/. On this page, you will find few section names at the top of the window. Attribute values for these menus (Home, Mail, News and so forth) are dynamic. Add these objects in Qualitia under some test case and execute the click action on it.
...
In this case, relearn this object using Qualitia Object Spy.
Info |
---|
In case the failure persists, you can edit the object, disable this option and add object locator type manually. Also, inform Qualitia support about the failure with appropriate logs. |