即使定义了步骤,也未定义的步骤错误

时间:2021-01-21 05:39:31

标签: python-behave

我在landing.py文件中有以下BDD给定声明

use_step_matcher("re")

@given(u'that I Land on the (page_name)landing page with the right offer id (?:start network traffic)')

我的特征文件如下:

场景:以utm参数开始的DR lil页面end2end测试

Given that I land on the "google page" landing page with the correct offer id start network traffic

当我尝试运行时,它说未定义的步骤

我正在使用步骤匹配器“re”,并且给定语句中的文本“启动网络流量”是可选的。为什么会失败

1 个答案:

答案 0 :(得分:0)

试试

@given(u'that I land on the {page_name} landing page with the correct offer id (?:start network traffic)')