Working with Objects Selection Method for Spy/Record Web
Estimated reading time: 1 minute
- Available since Katalon Studio version 5.0
- Katalon Studio Object Properties has the capability to auto-saved the content of Selector Editor when switching between modes of Selection Method.
- Object Identification Best Practices
Katalon Studio Object Properties makes Spying and Recording Web feature easier and more powerful. Enhanced Object Properties allows users:
- Choose objects locating strategies including XPath (Smart XPath), Attributes or CSS.
- Check only preferred object’s properties on the grid.
- Manually input the desired XPath or CSS locator in Selector Editor.
Configure Web Object Locators settings here.
Learn more about Smart XPath (a.k.a. Relative XPath).
Katalon Studio supports Relative XPath for better object recognition. If an element cannot be consistently located using its direct attributes, Katalon Studio will identify the element by using its more robust neighbors. This method is visually intuitive as it reflects the way users often identify a visible element on the user interface.
If Xpath option is selected, Katalon Studio will automatically generate a list of Relative Xpath based on your Web Locators Setting to identify the element.
If Attributes option is selected, Katalon Studio will automatically generate XPath locator that combined all selected object properties to locate that object. You can checked/unchecked preferred properties in the object properties table.
Test engineers who wish to manually input their own CSS locator for test objects can select CSS option. Once selected, object properties table will be collapsed and Selector Editor field becomes editable. Simply provide CSS locator in the Selector Editor text box.
Same as Attributesoption, click on Verify and Highlight button to make sure Katalon Studio can locate the web objects. Katalon Studio will display the message on how many elements are found or NOT found with input XPath or CSS locator. If the object is found, it will be highlighted with the red border.
Once finished, click Save to add objects to Object Repository as normal.
Verify and Highlight
Katalon Studio Object Properties has a built-in Verify and Highlight feature to help users double-check if the web objects can be located. Katalon Studio will display the message on how many elements are found or NOT found with generated XPath locator. If the object is found, it will be highlighted with the red border.
Once finished, click Save to add the object to Object Repository as normal.