-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add get_keyword_types
to support argument conversion
#83
Comments
It seems RemoteServer doesn't support argument conversion. The Remote API would support |
Thanks @pekkaklarck! Would you accept a PR for this? I dont mind trying to implement. |
Certainly. The general approach ought to be:
The hard part is Python 2 compatibility. It's been important that RemoteServer supports Python 2 especially when Robot Framework itself doesn't support it anymore, but it could be time to drop that support. That decision needs to be done separately and discussed with others. The #devel channel on our Slack is probably the best place. Another issue is that parameterized types like |
get_keyword_types
to support argument conversion
We discussed this on Slack and noticed one more problem: XML-RPC supports only a limited set of types and the Remote library itself converts other types to strings. For example, if I don't see any other way to handle this issue than enhancing RemoteServer so that it does argument conversion itself. Because it gets values converted by the Remote library, we know the exact format and conversion ought to be pretty straightforward. Setting the conversion infrastructure in place is some work nevertheless and that requires a separate issue. This issue can concentrate on adding |
Issue
When using a custom Python library via
RobotRemoteServer
, automatic type conversion seems to fail. All arguments are passed asstr
. When using the same library nominally, automatic type conversion occurs as expected.Actual Behavior
Multiply.py
multiply.robot
Executing the test with fails with
TypeError: can't multiply sequence by non-int of type 'str'
. Passing the arguments as named also fails.Expected Behavior
Running the test as a normal Python library works as expected:
multiply.robot
Is this a known limitation? I could not find any relevant documentaion. If not, then this is probably a bug in the
Remote
library I suspect. I am glad to open an issue there and look into a PR.System info:
python -m robot --version
->Robot Framework 6.0.2 (Python 3.10.6 on win32)
The text was updated successfully, but these errors were encountered: