Echo command not displaying variable contents

If I use the ‘storeValue’ command to store a value into a variable and then attempt to ‘echo’ the contents of the variable, it’s not working. The variable name itself is being displayed rather that the value it holds. This was a bug that was reported on 12/1/2017 and was apparently fixed in version 2.1.0. But it seems to be broken again. If I use this in my test case:

storeValue | id=edit-field-course-duration-und-0-value | ${var}

I see this in the log (the value I’m storing in var is 18, fyi):

[info] Store ‘18’ into ‘18’

[info] Executing: | echo | ${var} | |

[info] echo: ${var}

I’ve found if I remove the ${ } from the variable name, I see this:

[info] Store ‘18’ into ‘var’

[info] Executing: | echo | var | |

[info] echo: var

So removing the ${ } from the variable seems to store the value correctly now, but the echo command still doesn’t work. So my questions would be, is the ${ } needed to store values into variables and why isn’t the echo command working?

Hi. Try

storeValue | locator | var
echo | ${var}

${} is needed for echo, but don’t use it in storeValue.

Looks like that works. Thanks!

Can a var be used as a locator? doesn’t seem to be working for me