You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a library with a keyword with a dot in name like Keyword.with.dot using it without the library name works but prefixing it with the library name fails:
*** Settings ***
Library MyLib
*** Test Cases ***
Example
Keyword.with.dot # works
MyLib.Keyword.with.dot # doesn't work
The reason that the latter doesn't work is that if there are dots in keyword name, possible library is always considered to be the part before the last dot. The motivation has been that you can have libraries with dots in name like org.robotframework.ExampleLibrary but dots in keyword names are very rare.
You can actually only have a dot in a keyword name when using the dynamic library interface where you can define the name yourself. Neither Python nor Java support having a dot in a method name when defining a keyword using the static library API. Because dots in keyword names are rare, and a simple workaround is avoid using them, this issue isn't too severe. Should definitely be fixed, though, because the current behavior is very inconsistent.
The problem is relatively easy to fix by splitting the given keyword name from all possible dots and testing does any library/keyword name combination work. Because string matching is blazingly in Python and keyword names used in test data typically don't even contain dots, there is no risk that this would somehow slow down execution speed.
The text was updated successfully, but these errors were encountered:
The idea of this refactoring was to split keyword finding logic away
from way too long and pretty horrible `Namespace` class. The main
motivated was to ease adding new features (e.g. #888) and fixes
(e.g. #1771) to the keyword finding logic. New `KeywordStore` is still
too closely coupled with `Namespace`, but didn't want to do much
bigger changes in a minor release.
@guykisel, any comments about the changes are appreciated. It seems to
me that the approach I used was very similar to what you have done in
your fork to implement #1771.
If you have a library with a keyword with a dot in name like
Keyword.with.dot
using it without the library name works but prefixing it with the library name fails:The reason that the latter doesn't work is that if there are dots in keyword name, possible library is always considered to be the part before the last dot. The motivation has been that you can have libraries with dots in name like
org.robotframework.ExampleLibrary
but dots in keyword names are very rare.You can actually only have a dot in a keyword name when using the dynamic library interface where you can define the name yourself. Neither Python nor Java support having a dot in a method name when defining a keyword using the static library API. Because dots in keyword names are rare, and a simple workaround is avoid using them, this issue isn't too severe. Should definitely be fixed, though, because the current behavior is very inconsistent.
The problem is relatively easy to fix by splitting the given keyword name from all possible dots and testing does any library/keyword name combination work. Because string matching is blazingly in Python and keyword names used in test data typically don't even contain dots, there is no risk that this would somehow slow down execution speed.
The text was updated successfully, but these errors were encountered: