Cannot setText to object.. Help

I run the test and it always gives me this error. it cannot set the text to a field

Test Cases/Update Room Type - valid FAILED because (of) Unable to set text ‘Room Type27’ of object ‘Object Repository/Extranet/RoomsAndRates/RoomType/room-type-name’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Extranet/RoomsAndRates/RoomType/room-type-name’ located by ‘By.xpath: //input[@type = ‘text’ and @ng-model = ‘$ctrl.newRoomType.name’]’ not found)

This is my test:

Test Cases/Update Room Type - valid FAILED because (of) Unable to set text ‘Room Type27’ of object ‘Object Repository/Extranet/RoomsAndRates/RoomType/room-type-name’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/Extranet/RoomsAndRates/RoomType/room-type-name’ located by ‘By.xpath: //input[@type = ‘text’ and @ng-model = ‘$ctrl.newRoomType.name’]’ not found)

Hi John,
I think you have issues with your xpath. Please double check it or try with different locators.

@4836-Alice
yeap you are right! i fixed the xpath and it worked! thanks! i didn’t know that the xpath for a create and edit function is different even though they are technically the same page.
Thanks!!

Hello @5383-John can you explain to me the modification of xpath

Hi. I am running into a similar issue where my script is unable to set text. The xpath is //input[@id=‘DateofBirthSearch’] just as it says in the screenshot.

UnabletoSetText.png