robotframework / robotframework/RIDE

Create new keyword and default arguments

Open
#899 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement prio-medium
Dominant language
Python
Stars
1k
Forks
385
Avg merge
13m
Merged PRs (30d)
2

Description

Originally submitted to Google Code by GodTdd on 26 Sep 2011

When I want to implement new keyword, that has arguments as a input, currently ride will set the arguments in the following way:
*** Keywords ***
to do stuff ${foo} ${bar}

to do stuff
[Arguments] ${arg1} ${arg2}

Now, it would be really handy if the arguments given to the new keyword could be directly used as default arguments in the new key word. Example like this:
*** Keywords ***
to do stuff ${foo} ${bar}

to do stuff
[Arguments] ${foo} ${bar}

Most of the cases, at least me, I am changing the new keyword default arguments to the same as was an input. I agree that in some cases this is not valid but at least they are mode better than the current ${arg1}, ${arg2} and so on

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no files, tests, or entry points, so first locate the code path that creates a new keyword and its [Arguments] row in RIDE. Confirm the change by checking that entered call arguments are reused as defaults while existing behavior remains valid for cases where they should differ.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.