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

"Set Test Variable" - RIDE incorrectly gives error message "Argument: name Unknown variable" #362

Open
yanne opened this issue May 29, 2015 · 2 comments

Comments

@yanne
Copy link
Owner

yanne commented May 29, 2015

Originally submitted to Google Code by WillDe... on 2 Dec 2013

Version - RIDE 1.2.2 running on Python 2.7.6
Robot Version - Robot Framework 2.8.2

  1. Create a new test, test suite, etc
  2. Add 2 lines:
    Set Test Variable ${LoginUrl} http://google.com
    Open Browser ${LoginUrl}

Problem - both field are purple (indicating a bad value), and if you hover over them they say:
"Argument: name Unknown variable"
"Argument: url Unknown variable"

(See attached .png file for screenshot)

Thing is -

  1. This is completely valid syntax
  2. If you run it - it run just fine. RobotFramework runs this, despite RIDE saying there's an error.
@yanne
Copy link
Owner Author

yanne commented May 29, 2015

Originally submitted to Google Code by @mkorpela on 3 Dec 2013

Thanks for the report!

Set Test/Suite/Global Variable are dynamically setting the variable. They could also be used inside of a keyword or even a library and also conditionally. Thus RIDE can not always know that a variable exists - but in your example case IMHO it should be identified in similar way as
${LoginURL}= Set Variable Value http://google.com

For the implementer of this feature @⁠see local namespace

@yanne
Copy link
Owner Author

yanne commented May 29, 2015

Originally submitted to Google Code by @mkorpela on 9 Dec 2013

Unfortunately Set Test / Suite / Global Variable work in a very odd way compared to normal RF syntax..

Seems to require changes to localnamespace.py

Following should work after this:

Set Test Variable ${FOO} slkadlk
Set Suite Variable ${bar} dl kslad
Set Global Variable @⁠{zoo} kdsjak dksajdksj dsakjdksj

So lines after that (in the same keyword / test case) should identify FOO, bar and zoo as variables .. also they should be allowed to exist as arguments for Set Test / Suite / Global Variable. Also the implementation should correctly handle cases where these keywords have been overridden with something else.

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

No branches or pull requests

1 participant