Test objects seem to dissapear after recording

For the whole day test objects seem to disappear from the Objects Repository. But when I try to add them again it says that they already exist in the repo.
that is a really weird problem and I’ve already tried to start a new project and even reinstall of the Katalon Studio.
But the issue persists.
Right after cautious and thorough recording, the test run fails because objects either cannot be found or are not interactable (as Katalon says)

The Spy Web and Web Recording can help you get started, but then you need to help it. In your test script above, I don’t see one pause, or wait statement. Just click and set, click and set. Whenever your script moves to a new page, you need to pause to let your network catch up to your script. In this case, I would suggest to use:
WebUI.waitForPageLoad(10)

As well, I also include a wait for the elements to appear on the page. So use:
WebUI.waitForElementVisible(findTestObject(...), 10)

Also use the above wait statement for when one action causes a change in the page, like a check box causes an input to appear.

There is also:
WebUI.waitForElementClickable(findTestObject(...), 10)

but I think something has changed internally with this statement so I have been adding a 2 second delay along with this.

Go through your code and see if adding any of these statements assist your code to become more stable.

Note: You can also add verify statements to check on your Objects, like:

WebUI.verifyElementVisible(findTestObject(...))
WebUI.setText(findTestObject(...), "Your Text Value")
WebUI.verifyElementAttributeValue(findTestObject(...), "value", "Your Text Value", 10)

The Spy Web and Web Recording will not add the “verify” type of statements either. How do you know your “setText()” worked unless you verify it? Pun intended. :slight_smile:

As for your objects disappearing, I would say you are letting the tool control you instead of you controlling the tool.
What could be happening, the Spy only captures so many characters for a name, and if another object has the same “name” to the length of characters, your first object is over-written. It’s gone.

Do you give meaningful names to your objects or let the Recorder set it? When I started, I used the Recorder also, but then I couldn’t put my code together based on the names it made. So, yes it slows you down, but I renamed almost everything the Recorder or Spy captured. Unique names so there was no over-write.

Edit: you also need more folders under your OR. I use one folder per page, and then sometimes more folders beneath that. Your image has several labels in your code, but I don’t see any in the OR. Do you have a second project or second implementation that you are saving your objects to?

Thank you very much for such an exhaustive answers! The particular test case was for a long process with many steps and each would change the page completely.
Probably, it was me expecting the record function to work flawlessly :sweat_smile:
I just started using Katalon and I’m also very new to Automation in general.
Would you suggest me to change my approach towards thoroughly capturing and grouping all needed objects for a test case before instead of straightforward recording and hoping that it will automatically capture all objects?

Continue as you have for a period of time and then see if it works for you or perhaps you will “outgrow” the lack of additional statements that KS doesn’t put in for you, like those I stated in my first post. I now have a “copy and paste” mentality that works for me, but you may be different.