Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须将“#”符号作为特征文件中的参数传递。如何实现这一点,因为 # 符号代表功能文件中的注释
如果您使用的是 cucumber 4.xx 或更高版本,您可以在步骤定义中使用(.*)正则表达式来获取任何类型的参数。
示例功能文件:
Scenario: User searches for a character in Search When The user searches for # in the Search
示例步骤定义:
@When("The user searches for (.*) in the Search")