问题描述:

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

  • 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

网友答案:

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 "=".

相关阅读:
Top