Daniel Paczuski Bak
Daniel Paczuski Bak

Reputation: 4088

robotframework - keyword with multiple names

I have a resource file with a somewhat abstract function, click row, that is used in many different contexts in my codebase. To help with readability and searching, it would be ideal to have this keyword be accessible under many different names;

click group, click resource are both keywords I use in certain contexts so that a reader knows what's happening in context, but they are both just:

Click Group
    [Arguments]    ${group}
    Click Row    ${group}

Rather than having all of these "duplicate" keywords to act as aliases, is it possible to just define a keyword with alternate names? For example, something like:

Click Row
    [Aliases]    Click Group    Click Resource
    [Arguments]    ${target}
    Blah Blah

Upvotes: 0

Views: 1574

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 386210

No, there is no support for aliases.

If this is an accurate representation of your actual problem, you can use keyword arguments so that "Group" and "Resource" and "Row" are arguments to the keyword "Click".

Upvotes: 3

Related Questions