【发布时间】:2021-07-21 10:01:52
【问题描述】:
我正在使用柏树黄瓜。我有以下情况
When I go to home page I extract the price
When I go to shopping cart page I extract the price
Then the price on the home page and shopping cart page is same
步骤定义:
When('I go to home page I extract the price', () => {
......
......
const homePagePrice = 100
)
})
When('I go to shopping cart page I extract the price', () => {
......
......
const shoppingCartPagePrice = 100
)
})
Then('the price on the home page and shopping cart page is same', () => {
......
......
)
})
我的问题是:如何在“那么主页和购物车页面上的价格相同”的步骤定义中传递主页和购物车页面中提取的价格
实现它的最佳方式/最佳实践是什么?
【问题讨论】:
标签: cypress cypress-cucumber-preprocessor