I am new to RF and I encountered the 'Variable not found' error. I was trying to pass a user-defined variable under a user-defined keyword.
The code is as below
Decimal selection
[Arguments] ${decimalval}
${decimalval} = Set variable If
... '${decimalval}'=='0' //md-option[@value='0dp']
... '${decimalval}'=='1' //md-option[@value='1dp']
... '${decimalval}'=='2' //md-option[@value='2dp']
[return] ${decimalval}
And once ${decimalval} is set with "//md-option[@value='#dp']" based on the condition, I try to use it under a user-defined keyword as below
Click Element ${decimalval}
This is where the code fails and throws the variable not found error.
Any help would be greatly appreciated. Thanks.