You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Set Test Variable" - RIDE incorrectly gives error message "Argument: name Unknown variable" #1351
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 -
This is completely valid syntax
If you run it - it run just fine. RobotFramework runs this, despite RIDE saying there's an error.
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.
Activity
robotframework-ride commentedon Jun 3, 2015
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
robotframework-ride commentedon Jun 3, 2015
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.