Object Identification in Katalon Web Recorder


#1

While recording the script the recorder is identifying the object by the text displayed in the object (like values in the dropdown).
There is a method “selectOptionByValue”. If there is something to choose by ID then it will be helpful.

Example:

WebUI.selectOptionByValue(findTestObject('Object Repository/RecordRequest3/Page_PAGETITLE/select_–Select—DBOption1),
‘1’, true)

Please find the Recorded Script -highlighted object identification Name

In my application, I will be loading dropdowns based on values from database and not all the time the same text will appear.
So please let me know if I can make the recorder to take only ID and NAME attributes of the HTML elements and not text value inside the elements.


#2

Hi @Harikumar

You can eliminate the text attribute from attributes that the recorder will use to identify objects.
Project -> Settings -> Test Design -> Web Locators.
Under Attributes option, you can check/uncheck attributes that are appropriate for your testing purposes.

Is this what you’re looking for ?

Regards !


#3

No, My Actual problem is generated Object Repository name .

For our requirement , we need generated object Repository name should be a based on the id attributes.

Example :
In attached screenshot , Please find the highlighted(default generated ) object Repository name-select_–Select–AC-Maintanenc for select Dropdown field.

  • The mentioned naming convention is risky to identify for us, because in my application screen , we are handling with multiple drop down fields. So, we need object Repository Name should be generate based up on id attribute

Expected Object Repository Name:select-Ddl_Category
FYR, Please find the screenshot:

Actual Object Repository Name(By Katalon):select_–Select–AC-Maintanenc

Kindly , suggest me how to handle this in Real time.


#4

Hi @Harikumar

Unfortunately the naming convention of Katalon Studio isn’t customizable, I have added into our back log and we will discuss among our team.

Regards !


#5

Dear ThanhTo,

Thanks for your suggestion. we are looking forward for your Response to achieve the same.


#6

Dear @Harikumar,

Can you let us know why you want test objects to be named like that (by ID or Name)?
At this moment, do you manually rename your test objects or just let it be?

Thanks and Best regards,


#7

Dear Dung_ngo,
I am loading the values to my control dynamically from Database. The value will not be same while recording and while playback. I may use the same script for different databases with different values.
If any object is identified only by value then it will not work for other database.

Please let me know if there are any means to record the object using attributes like ID or NAME.

With Thanks and Regards,
Harikumar


#8

Dear ThanhTo,

Please let us know if there is any possibilities or update for above posted query?