robotcode icon indicating copy to clipboard operation
robotcode copied to clipboard

[ENHANCEMENT] Support for assigning variables with item values

Open d-biehl opened this issue 9 months ago • 0 comments

see here

*** Test Cases ***
Item assignment to list
    ${list} =          Create List      one    two    three    four
    ${list}[0] =       Set Variable     first
    ${list}[${1}] =    Set Variable     second
    ${list}[2:3] =     Evaluate         ['third']
    ${list}[-1] =      Set Variable     last
    Log Many           @{list}          # Logs 'first', 'second', 'third' and 'last'

Item assignment to dictionary
    ${dict} =                Create Dictionary    first_name=unknown
    ${dict}[first_name] =    Set Variable         John
    ${dict}[last_name] =     Set Variable         Doe
    Log                      ${dictionary}        # Logs {'first_name': 'John', 'last_name': 'Doe'}

d-biehl avatar May 09 '25 11:05 d-biehl