![](/img/trans.png)
[英]How to pass multiple examples with different number of parameters in Cucumber feature file
[英]How to give multiple parameters in the cucumber feature file
我能知道如何在功能文件(黃瓜)中傳遞多個參數嗎?
例如:我需要自動化網站頁腳部分中的鏈接,就像該部分中有超過 14 個鏈接一樣。 哪種方式適合傳遞這些多個參數。
請幫我
使用 Secnario Outline 您可以傳遞多個參數。下面是功能文件示例。
Scenario Outline: login with valid username and password
Given open browser
When enter the URL "example.com"
And Enter register username "<username>" and password "<password>"
And Click on login button
Then verify login
Examples:
| username | password |
| **************** | ********** |
| **************** | ********** |
| **************** | ********** |
您可以嘗試使用java 中的黃瓜功能發送多個文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.