In Robot Framework, what is the difference between a List Variable and a Scalar Variable containing a list?

有些话、适合烂在心里 提交于 2019-12-05 07:59:53
Bryan Oakley

In case of the assignment shown in your question, there is no difference. If you log each of those you'll get the exact same output.

Note: this functionality was introduced in version 2.8 (see Using scalar variables as lists in Robot Framework User's Guide).

The difference comes when you use the values. When you use the @ symbol to reference a list, each of the elements in the list becomes a cell. In the following example, the following three lines give identical results:

| | A keyword that expects three arguments | a | b | c
| | A keyword that expects three arguments | @{list}
| | A keyword that expects three arguments | @{scalar}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!