My test in robot looks like below
${filter} = Create Filter with apps ${appList}
I’ve already declared the variable appList in my yaml file and loaded it in my test file.
Now I’ve my keyword file like below
Create Filter with apps ${list}
${app_filter} = Generate app filters ${list}
Generate app filter is my Python function which is as below
def generate_app_filters(appList=[]):
for app in appList:
print(app)
With this setup, when I have ${appList} value as [“app1”, “app2”] in my variable yaml, it should be read as 2 separate apps in the python function generate_app_filter. My expected output should be like below
app1
app2
But my actual output is like this
[
"
a
p
p
1
"
,
"
a
p
p
2
"
]
I’m facing an issue where the generate_app_filters receives the argument as a string. Like"['app1', 'app2']"
but not ['app1', 'app2']
. Because of this, my Python function reads every character as a list element but not how I wanted it.
Am I doing anything wrong with the config?