Ctrl + click shortcut not working when changind findTestObject to fTO

Hi everyone,

Today I was making some improvement on my Katalon project, changing every “findTestObject” as “fTO” by doing “import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject as fTO”
so I can write like this: “WebUI.verifyelementPresent(fTO(“ObjectRepository/Object”, timeout)”.

Every testcases are working fine but the Ctrl+Click shortcut on the “ObjectRepository/Object” isn’t working now.

I would like some help on this case! Thanks !

1 Like

Hi there,

Thank you very much for your topic. Please note that it may take a little while before a member of our community or from Katalon team responds to you.

Thanks!

What you are doing is creating an Alias for the method or statement. However, the “alias” has a scope of being within the class where you created it. Similar as in SQL, the “alias” is only scoped to your query. So, if you want your “alias” to be useful outside of your class, then you need to find (or have Katalon staff tell you) where you can add/change for your “new” method name to be “global”.

I did it for “WebUiBuiltInKeywords” to become “AutoBot” or “WebAI” but it was only good for the test case of the Script tab and didn’t work when viewed in the Manual tab, although the alias “WebUI” does work. I still haven’t found where the other location(s) are where to change the alias(es). Problem could be that we would only be allowed one and have to stick to it!

1 Like

I can’t see anything wrong with what you tried to do. I’d say that’s a bug.

@duyluong @mike.verinder

1 Like

Thanks for the reply, I’ll pass the potential bug on to Katalon.