Embedding arguments into the keyword name works only with user
keywords. The main reason this support wasn't implemented for library
keywords is that we couldn't figure out any suitable syntax. If
someone has an idea how it should work, the functionality could be
added possibly already in RF 2.5.
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
It didn't need to be even this complicated. With user keywords it's
enough that a) the keyword has variables embedded like
"high_${number}", and b) the keyword doesn't take any arguments. With
the dynamic library API where the library returns the keyword names we
could actually use exactly same rules.
A bigger problem would be how to support this with the static library
API. It's not possible to have a method with name like
"high_${number}" in the code so we needed to figure out some other
syntax. Any ideas?
Personally I'm not sure that library keywords even need this
capability. I've found that the possibility to embed arguments to the
keyword names works best on higher level test cases where you really
want to make the test read like plain text requirement or example.
Even in such cases I've been happy to use the normal argument passing
mechanism with the lower level keywords needed by these tests. Notice
that I'm not saying this functionality would be totally useless or it
will never be added. Getting it into RF 2.5 will require external
help, though.
Cheers,
.peke
A bigger problem would be how to support this with the static library
API. It's not possible to have a method with name like
"high_${number}" in the code so we needed to figure out some other
syntax. Any ideas?
Personally I'm not sure that library keywords even need this
capability. I've found that the possibility to embed arguments to the
keyword names works best on higher level test cases where you really
want to make the test read like plain text requirement or example.
Even in such cases I've been happy to use the normal argument passing
mechanism with the lower level keywords needed by these tests. Notice
that I'm not saying this functionality would be totally useless or it
will never be added. Getting it into RF 2.5 will require external
help, though.