I am trying to click on the logout button but it fails and i receive this error …Test Cases/Loop1/LoopLogin FAILED because (of) Unable to click on object ‘Object Repository/LoopLogin_OR/Page_LoopmiWeb (1)/a_Logout’ .
I really do not understand how custom keywords work. Please help out.
Custom keywords in katalon is a class. You can create methods in there just like creating a method in an ordinary java class.
When you want to call a keyword/method, go to your test case and type this
//to call a keyword
CustomKeyword.‘thePackage.theClass.yourKeyword’(parameters here if there’s any)
//use a standard process of calling a method, like creating an instance
//import the name of your keyword package
YourClass classInstance = new YourClass()
classInstance.yourMethod(parameters here if there’s any)
*note that when you use the first approach you should use the ‘@Keyword’ annotation and save the solution first before calling it in your test case. It should look like this:
public void YourMethod(parameters here if there’s any)
//your code here
Hope this helps. . .
With regards to the error you are receiving, maybe the button is disabled or your locator is locating some object that is not clickable. Like maybe it locates some other objects with the same name or title or class. Try to double check the source and the attributes of it and how it behaves. Or much better if you can provide the source here so that we can analyze your problem and give you a much better solution
I am trying to create a custom keyword to help click on this logout button. I am new to this, my coding skill is at the beginners level. I am wondering how this method would ook like and the parameters to pass.
Back to your request, what source are you asking for?