Automation One By One - Robot Framework - 数据类型
2011-10-20 17:08
561 查看
Robot Framework中的数据类型均是通过变量(Variable)来表达的。
Robot Framework提供以下几种数据类型:
1. 字符串:${variable}, ${get value from keyword}, 80 ... 默认均是字符串类型
2. 数值型:表达数值型,必须使用${Numbers}来表示
3. 布尔值
4. Null/None值
上述这些类型的变量均是大小写不敏感的,即 ${True} and${true} 是相等的. 另外,
${None} and${null} 属于属于同义词。
5. 空格、Empty
Robot Framework允许你使用${SPACE},${EMPTY}来表示空格及空
Robot Framework提供以下几种数据类型:
1. 字符串:${variable}, ${get value from keyword}, 80 ... 默认均是字符串类型
2. 数值型:表达数值型,必须使用${Numbers}来表示
Test Case | Action | Argument | Argument | Comment |
---|---|---|---|---|
Example 1A | Connect | example.com | 80 | # Connect gets two strings as arguments |
Example 1B | Connect | example.com | ${80} | # Connect gets a string and an integer |
Example 2 | Do X | ${3.14} | ${-1e-4} | # Do X gets floating point numbers 3.14 and -0.0001 |
Test Case | Action | Argument | Argument | Comment |
---|---|---|---|---|
Boolean | Set Status | ${true} | # Set Status gets Boolean true as an argument | |
Create Y | something | ${false} | # Create Y gets a string and Boolean false |
Test Case | Action | Argument | Argument | Comment |
---|---|---|---|---|
None | Do XYZ | ${None} | # Do XYZ gets Python None as an argument | |
Null | ${ret} = | Get Value | arg | # Checking that Get Value returns Java null |
Should Be Equal | ${ret} | ${null} |
${None} and${null} 属于属于同义词。
5. 空格、Empty
Robot Framework允许你使用${SPACE},${EMPTY}来表示空格及空
Test Case | Action | Argument | Argument |
---|---|---|---|
One Space | Should Be Equal | ${SPACE} | \ \ |
Four Spaces | Should Be Equal | ${SPACE * 4} | \ \ \ \ \ |
Ten Spaces | Should Be Equal | ${SPACE * 10} | \ \ \ \ \ \ \ \ \ \ \ |
Quoted Space | Should Be Equal | "${SPACE}" | " " |
Quoted Spaces | Should Be Equal | "${SPACE * 2}" | " \ " |
Empty | Should Be Equal | ${EMPTY} | \ |
相关文章推荐
- Automation One By One - Robot Framework - Keyword/Variable Files
- Automation One By One - Robot Framework - 优化Test Case
- Automation One By One - Robot Framework - 变量及赋值
- Automation One By One - Robot Framework - User Keywords
- Automation One By One - Robot Framework - Test Suite
- oracle常用的复合数据类型 : BULK COLLECT(成批聚合类型)和数组集合type类型is table of 表%rowtype index by binary_integer
- 复合数据类型--此处偶做了index_by表的试验
- Opencv step by step - 基本数据类型
- Java的基本数据类型全解(by 星空武哥)
- javascript 简单高效判断数据类型 系列函数 By shawl.qiu
- javascript 简单高效判断数据类型 系列函数 By shawl.qiu
- C语言step-by-step(二)(数据类型)
- 自动化(Automation)兼容的数据类型
- 借用implicit创建我们自己的布尔数据类型-create MyBool data type by implicit
- gethostbyaddr使用时发生 11004 请求的名称有效,但是找不到请求的类型的数据。
- mysql order by 排序 varchar 类型数据
- javascript 简单高效判断数据类型 系列函数 By shawl.qiu
- JS_对各类型数据的操作方式_ByValue/ByReference
- oracle常用的复合数据类型 : BULK COLLECT(成批聚合类型)和数组集合type类型is table of 表%rowtype index by binary_integer
- javascript 简单高效判断数据类型系列函数 (转) By shawl.qiu