I faced an instance where the test case would not run. It did not open the browser, show a compilation error, nor any type of error. After troubleshooting the issue, it turns out that having a variable of CustomKeywords, ex: CustomKeywords x …, would crash the run action.
Is there any explanation for this? And perhaps any tips on the best practice for calling CustomKeywords, instead of typing the whole normal syntax?
I never use “the whole normal syntax” as you put it.
To help you, you need to help me but posting your code.
[Updated Dec 2019]
My test is BROKEN! NOTHING WORKS! HELP ME!
Relax. We get it. We really do. There are some pretty smart and clever people on this forum, but you must realize, they are not magicians or wizards or gods. They cannot see your code, they can’t see your errors and they don’t even know what your AUT is meant to do even though it might seem perfectly obvious to you.
So please relax and follow the advice below, before you start writing your post. The advice below will tell you th…
Hello Russ, my apologies for the lack of code. What was meant by the “normal syntax” of using a Customkeyword is calling it using :
A simple example of a test case
WebUI.callTestCase(findTestCase(‘Test Cases/Log In/Log In Basic’), null)
int count = CustomKeywords.‘findChildrenCount.getTableSingleRow’(Object, 2)
My question here is if there’s a better way to call the CustomKeywords?
However, the main topic of this thread is why did Katalon not show any error message or notification when I randomly typed:
Is there any explanation behind this behavior?
Yes, like this:
import static YourKeywordClass.* // get all methods STATICALLY
findChildrenCount is declared static, too.
I had not thought of importing my Keyword package. Thank you Russ!