Confuse about Robot Framework data-driven sample? What is "C${}="?

214 views Asked by At

I have done some research about this syntax but I can't find a meaning of it.

enter image description here

  • Could someone explain a little bit more of this "C${expression}="?

  • How is this different with ${expression}?

Thank you in advance.

original file is: https://bitbucket.org/robotframework/robotdemo/src/51f472687b6a46e88b7c179423f0f336e19497fc/data_driven.robot?at=master&fileviewer=file-view-default

1

There are 1 answers

1
Bryan Oakley On BEST ANSWER

In this context, C${expression}= is the string "C", followed by whatever is in the variable ${expression}, followed by the string "=".

This code has a keyword named Push buttons which takes as a single argument a string of characters representing buttons. When you call Calculate with an argument like 2+4, ${expression} will be 2+4, so C${expression}= is the string C2+4=. The Push Buttons keyword will then simulate pressing "C", "2", "+", "4", and "=".