I'm trying to pass a dynamic value from robot framework to a variable in python file (which have all my variables).
In .py file I have the following:
index = BuiltIn().get_variable_value("${iIndex}")
MyDynamicVar="xpath://div["+str(index)+"]" #or without str
and in .robot file I have:
FOR ${i} IN RANGE ${c}
${iIndex} = Set Variable ${i+1}
log to console ${MyDynamicVar}
log to console ***************************************
END
I tried to set an initial value in variables sections in robot file, and the value changed, but I need the value to be dynamic!