![](/img/trans.png)
[英]How to pass Scenario name from the Cucumber feature file as a parameter in the Cucumber steps?
[英]How to pass "#" as a valid parameter in feature file using java cucumber
我必須在功能文件中傳遞“#”符號作為參數。 如何實現#符號代表功能文件中的注釋
如果您使用的是 4.xx 或更高版本的 Cucumber,您可以在步驟定義中使用(.*)正則表達式來獲取任何類型的參數。
示例特征文件:
Scenario: User searches for a character in Search
When The user searches for # in the Search
示例步驟定義:
@When("The user searches for (.*) in the Search")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.