Recorded scripts are not Working in Katalon Studio 5.1.0

Dear Colleagues,

I am facing a problem related to a test script for web testing which is recorded using Katalon Studio.

When the test script is run after recording the test script does not work but the same test recorded test script works when we replay the test case using Katalon recorded.

Please find the screenshot attached with this mail.

In Katalon Recorder syntax is :- Command :- type

                                                Target       :- **id=cartEntries\[23\].quantity**

                                                Value        :-  

In Katalon Studio the syntax is :-

WebUI.setText(findTestObject(‘Page_Aravon Rockport Group Rockpo/input_cartEntries[23].quantity’), ‘1’)

Please find the screen shot attached for your reference.

Thanks and Regards,

Deepak Chougule

SizematrixUI.png

WebUI Code Screen shot.png

Is there any error message from your side?

Hi Vinh,
Please find the error message we get is as mentioned below :-

Test Cases/Dunham FAILED because (of) Unable to set text ‘1’ of object ‘Object Repository/Dunham/Page_Dunham Rockport Group Rockpo/input_cartEntries23.quantity’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Dunham/Page_Dunham Rockport Group Rockpo/input_cartEntries23.quantity’ located by ‘By.xpath: //input[count(. | //[@type = ‘text’]) = count(//[@type = ‘text’])][count(. | //[@class = ‘sku-quantity matrixField’]) = count(//[@class = ‘sku-quantity matrixField’])][count(. | //[@name = ‘cartEntries[23].quantity’]) = count(//[@name = ‘cartEntries[23].quantity’])][count(. | //[@id = ‘cartEntries[23].quantity’]) = count(//[@id = ‘cartEntries[23].quantity’])][count(. | //[@value = ‘0’]) = count(//[@value = ‘0’])][count(. | id(“multiDVariantTable_0”)/tbody[1]/tr[@id=“sizeRow_1”]/td[@class=“redBg editable-height highlight”]/div[@class=“fieldBg editable-cnt”]/input[@id=“cartEntries[23].quantity”]) = count(id(“multiDVariantTable_0”)/tbody[1]/tr[@id=“sizeRow_1”]/td[@class=“redBg editable-height highlight”]/div[@class=“fieldBg editable-cnt”]/input[@id=“cartEntries[23].quantity”])]’ not found)

Screen shot provided is of a size matrix and when we provide the quantity in the size matrix it does not get populated due to which test recorded test fails in Katalon Studio.

Also please let me know what is the best way to create the test case , by using manual mode or
script mode or recording test scripts.

Lot of times the recorded test scripts does not work in Katalon Studio , same problem we face when we try to select the dates , please find the error for the same.

Test Cases/Dunham FAILED because (of) Unable to set text ‘1’ of object ‘Object Repository/Dunham/Page_Dunham Rockport Group Rockpo/input_cartEntries21.quantity’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Dunham/Page_Dunham Rockport Group Rockpo/input_cartEntries21.quantity’ located by ‘By.xpath: //input[count(. | //[@type = ‘text’]) = count(//[@type = ‘text’])][count(. | //[@class = ‘sku-quantity matrixField’]) = count(//[@class = ‘sku-quantity matrixField’])][count(. | //[@name = ‘cartEntries[21].quantity’]) = count(//[@name = ‘cartEntries[21].quantity’])][count(. | //[@id = ‘cartEntries[21].quantity’]) = count(//[@id = ‘cartEntries[21].quantity’])][count(. | //[@value = ‘0’]) = count(//[@value = ‘0’])][count(. | id(“multiDVariantTable_0”)/tbody[1]/tr[@id=“sizeRow_1”]/td[@class=“redBg editable-height highlight”]/div[@class=“fieldBg editable-cnt”]/input[@id=“cartEntries[21].quantity”]) = count(id(“multiDVariantTable_0”)/tbody[1]/tr[@id=“sizeRow_1”]/td[@class=“redBg editable-height highlight”]/div[@class=“fieldBg editable-cnt”]/input[@id=“cartEntries[21].quantity”])]’ not found)

Thanks and Regards,
Deepak Chougule.

In Katalon recorder this is recorded as an array id=cartEntries[23].quantity