Artem Grechanichenko
Artem Grechanichenko

Reputation: 23

Robot Framework how to call keyword with variable library name

I have a 2 similar Remote Libraries with same keywords.

Library    Remote    172.18.92.194:50000    WITH NAME Client1
Library    Remote    172.18.92.194:50000    WITH NAME Client2

and i wish to create test case, which be run keyword from this libraries Something like that.

Connect to FTP server active mode
[Arguments]    ${Client}
${Client}.ftp connect active mode     host    user    password

The problem is that RF is not parsing the contents of the variable in the call of keywords with the syntax library name.keyword

Upvotes: 2

Views: 3740

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 385970

Robot will not resolve variables when calling a keyword like that. What you can do, however, is use Run Keyword, like so:

Connect to FTP server active mode
    [Arguments]   ${Client}
    Run keyword   ${Client}.ftp connect active mode    host    user    password

Upvotes: 4

Related Questions