Shorter keyword name

is there anyway to assign nicknames for custom keywords for example
insted of accessing the keyword using
com.company.mypackage.Communication.SendRequest
we can access it using Communication.SendRequest or something similar

add “import com.company.mypackage” to your imports.

Thank you for your quick reply but is there any way to add it to the test case using manual mode and not script mode ?

I don’t think so. Imports aren’t really part of the test execution. Why do you need it added during test case ?
Edit: I think I understand now where you meant you want shorter keyword. I’ve not been able to make the name shorter in the Manual mode.

Yeah i didn’t really expect it to be possible but i wanted to make sure , i want to add it so our testers wont confuse methods when they are creating the tests

Thank you anyway

Hi,
The only solution I found was to create the package with a short name
Example :
Package name : actions
Keyword name : Communication
Method name : SendRequest
Like this, the manual testers will add actions.Communication.SendRequest to the test

Unfortunately our company’s conventions specify that it must be named like this , Using another format will cause other problems , but thank you for your suggestion :slightly_smiling_face:

@yoyox98

You can leave the companies class as is.

You would be able to create a custom keyword actions.Communication with a method SendRequest. The class can extend the com.company.mypackage.Communication.

The action.Communication.SendRequest will be accessible in the Manual mode.

27

Ah, I made a bit of mistake.

The SendRequest method of the actions.Communication class should rather be like this:

@Override
@Keyword
public String SendRequest(String name) {
    return super.SendRequest(name)
}

thank you for your suggestion i’m going to do that