Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

Enable argument type conversion based on default values#88

Open
heidecjj wants to merge 1 commit intorobotframework:masterrobotframework/PythonRemoteServer:masterfrom
heidecjj:type-conversion-based-on-defaultheidecjj/PythonRemoteServer:type-conversion-based-on-defaultCopy head branch name to clipboard
Open

Enable argument type conversion based on default values#88
heidecjj wants to merge 1 commit intorobotframework:masterrobotframework/PythonRemoteServer:masterfrom
heidecjj:type-conversion-based-on-defaultheidecjj/PythonRemoteServer:type-conversion-based-on-defaultCopy head branch name to clipboard

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.