柏树黄瓜错误缺少的步骤实现:Given User用角色TestRole和auth-testAut签出用户



我得到了Cypry错误步骤实现丢失:给定用户使用角色TestRole和auth-testAut签出用户

功能文件:

Feature: Initial Test
Scenario Outline: Test file to test feature files.
Given User checks out user with role <role> and auth <aut>
And User visit home page
Then User click sign in link on the top right of the page
Examples:
| role    | aut   |
| TestRole | testAut |

步骤定义文件:

Given('User checks out user with role {string} and auth {string}', (role,aut) => {
cy.log('Inside check out user step!!!!!')
})

{string}是带引号字符串的黄瓜表达式。所以你可能需要在你的场景中写

Given User checks out user with role "<role>" and auth "<aut>"

你能试试吗?

另一种选择是在表中包含引号:

Examples:
| role    | aut   |
| TestRole | "testAut" |

最新更新