Skip to content
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

Enable argument type conversion based on default values #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heidecjj
Copy link

@heidecjj heidecjj commented Jan 3, 2025

As of Robot Framework 3.2, an argument with a default value can be represented as a ('name', 'default') tuple. Doing so allows Robot Framework to do automatic argument type conversion before passing argument values to a remote keyword.

From https://robotframework.org/robotframework/7.1.1/RobotFrameworkUserGuide.html#getting-keyword-arguments

As explained in the above table, default values can be specified with argument names either as a string like 'name=default' or as a tuple like ('name', 'default'). The main problem with the former syntax is that all default values are considered strings whereas the latter syntax allows using all objects like ('inteter', 1) or ('boolean', True). When using other objects than strings, Robot Framework can do automatic argument conversion based on them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant