...
Locator Types
The Object Spy has the following locator types:
- Link
- Name
- IdXPath
- LinkID
- Xpath
...
- CSS
This is the default sequence. You may change the sequence as per your requirements.
Locator Priority Settings
The built-in algorithm helps to choose best suitable Locator Type locator type while finding the best Locator suitable locator to HTML element being inspected.
Qualitia does not use ID attribute when inspecting objects by XPath.
To change the locator priorities:
- On Object Spy toolbar, click the Settings icon.
The Locator Priority Settings window appears.- Click Up/Down buttons to changes the priorities of the
...
- locator type.
- Click Restore Default to restore the default priorities.
- Click Cancel to discard changes.
- Click Ok to apply the changes.
...
...
Object Learning Algorithm
Based on the preferred locator types, Object Spy looks for name property of the desired object. If it is not found it looks for the next preferred locator type which is for example idID. If it is not found, it then derives Xpath by referring to other native properties of the object or even of a parent if required. This is typically required in a case of duplicate objects.
For more information on duplicate objects refer to the section Challenging Situations in Object Identification and Remedies section.A case when
When Object Spy overrides the preferred locator type even if the object has Name or
...
ID Attributes
Assume you have set preference of Locator Type locator type as Name, IdID, Xpath, and Link. The object which you want to add has name property. Object Spy reads the value of name property and check checks whether there is another object that has same value of the name property. If a duplicate is found then Object Spy overrides preference and look looks for id ID or Xpath.
Once Object Spy is sure about the locator type and value being unique for the object, the object will get added. You can further edit the logical name of the object and rename it.
Once the objects are added and saved from Object Spy, you can select objects from the object drop-down without any need to refresh or relaunch Qualitia.
...
Objects under Frame
This is very much peculiar to Selenium the way it a typical method that Selenium operates with objects. Selenium searches the object within the scope of the HTML page. Frame element also can hold 'HTML' tag enclosed within. If Selenium is supposed to act on any object under frame, it has to first decide the scope of searching the object in the HTML within the frame and not outside HTML. This is typically done by selecting a frame during development of a test case.
...
Object Identification Failure
Object identification failure can be categorized in by the following cases:
- Object does not exist
Object identification failure may be occur due to network latency, . This may happen when designated page is heavy to load in expected time or connectivity failure. This can be handled by changing synchronization time. For more information on synchronization time, please refer to "Qualitia Object Spy Feature Help".
- Object exists but tool failed to identify
A tool may fail to identify an object when object identification is based on incorrect attributes. Selected attributes might not have a static value. At times, there are properties, which are supposed to be static but contain dynamic values.
For example, id ID attribute is supposed to be static but there are frameworks that generate values of id ID attribute dynamically.
In such cases, your id ID values are supposed to change every time you refresh a page. On the other hand, there can be situation where a window is identified by title. If title contains timestamp time stamp as a part of the title, it is prone to change repeatedly after each login. In all such cases, it is advisable to look for other another property that is static and uniquely points to the desired object. If there is none and you have to deal with dynamism of the attribute value, check whether the dynamic portion of attribute value is predictable or not.
For example, when user1 logs in, the Login window has a title 'welcome user1'. If you change the login credential to user2, welcome will remain the same and the dynamic portion 'user2' is predictable that is 'welcome user2'.
Dynamic portion in this case is the same as the user credential used. Same The same user credential can be passed as part of attribute value.
For more information on how to handle this situation in Qualitia, please refer to "Qualitia Object Spy Feature Help".
If dynamic portion is not predictable, then the common practice is using regular expression to get rid of the dynamic portion. In the same example of login title, title property can hold a regular expression as 'welcome.*'. You can ignore the dynamic portion and rely on static portion if it uniquely points to the desired object.