Can't find elements after recording test case

Hi everyone,

I’m new on automated tests and also on Katalon Studio. I’m in trial and testing the Katalon Studio by creating test cases on our PWA Site builded on IONIC.

I’m facing some errors related with elements not found, right after recording.

In error stack I can see the element name is not right. This not make any sense because all the script is created by the recorder.

Can anybody help to understand if I need to set any option on project for the right recording?

Best regards.

Paulo Pinto.

The tools will help you a lot by generating lots of TestObjects as the raw materials with which you can get started with testing.

But you shouldn’t expect the recording tools to be perfect all the time. There are a lot of reasons that confuse the tools. The artifacts by the tools will contains something poor. It’s usual. I am not surprised to hear you have got TestObjects that don’t work. When you find errors in the generated scripts and testobject, you should just edit them to correct them.

In other words, you need to be skilled enough for CSS Selectors and/or XPath expressions so that you can correct the tools’ mistakes.

1 Like

Additionally, you may need to add some WAIT statements to your code (or delays) so that the various objects have time to be on the page when you are trying to use them. Just using the Recorder does not take into account the time behind the scenes an operation may take.
As an example:

WebUI.navigateToUrl(gSiteURL)
WebUI.waitForPageLoad(10)

WebUI.waitForElementVisible(findTestObject('myPage/select_AddressType'), 10)
WebUI.verifyOptionPresentByLabel(findTestObject('myPage/select_AddressType'), 'Mailing', false, 10)
WebUI.verifyOptionPresentByLabel(findTestObject('myPage/select_AddressType'), 'Primary Residence', false, 10)
2 Likes

Hi @kazurayam ,

Thanks for your reply.

Best regards.

1 Like

Good point!