Duplicate Keywords in Library and Resource Keywords
Sometimes, we will meet duplicate keywords in different library orresource keywords. There are two ways we can use it.
Add Library Name beforeKeywords
APCLI User Login OK | [Arguments] | ${ip addr}=192.168.0.1 | ${port}=23 | ${username}=super | ${password}=sp-admin |
|
| RWQAAPCLIKeywords.APCLI Login with Telnet | ${ip addr} | ${port} | ${username} | ${password} |
|
| RWQAAPCLIKeywords.APCLI Status Should Be | SUCCESS |
|
|
|
|
| APCLI Get Version OK |
|
|
|
|
|
|
|
|
|
Set Library Search Order
Set Library Search Order | *libraries | Sets the resolution order to use when a name matches multiple keywords. The library search order is used to resolve conflicts when a keyword name in the test data matches multiple keywords. The first library (or resource, see below) containing the keyword is selected and that keyword implementation used. If the keyword is not found from any library (or resource), test executing fails the same way as when the search order is not set. When this keyword is used, there is no need to use the long LibraryName.Keyword Name notation. For example, instead of having
you can have
Starting from Robot Framework 2.6.2 this keyword can be used also to set the order of keywords in different resource files. In this case resource names must be given without paths or extensions like:
NOTE:
|