我正在使用柏树黄瓜。我有以下情况
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', () => {
......
......
)
})
我的问题是:如何在“然后主页和购物车页面上的价格相同”的步骤定义中传递在主页和购物车页面中提取的价格
实现它的最佳方式/最佳实践是什么?