这是我正在使用的代码:
Scenario Outline: Fill <answers> for Shares
When Select one of "<answers>" from Shares
Then One of the Shares dropdown "<answers>" will be visible
Scenario Outline: Fill <answers> for Forex
When Select one of "<answers>" from Forex
Then One of the Forex dropdown "<answers>" will be visible
Examples:
| answers |
| Frequently |
| Sometimes |
| No |
但是我得到的错误是第一个Scenario Outline没有例子。重点是:这个例子是重复的,所以我问我可以使用一个例子表来表示多个场景大纲吗?
场景大纲必须有例子。您可以使用以下单一场景大纲和所有选项。
Scenario Outline: Fill <answers> for Forex
When Select one of "<answers>" from <type>
Then One of the Forex dropdown "<answers>" will be visible
Examples:
|type | answers |
|forex | Frequently |
|forex | Sometimes |
|forex | No |
|shares | Frequently |
|shares | Sometimes |
|shares | No |