简体   繁体   English

cucumber特征文件中如何给多个参数

[英]How to give multiple parameters in the cucumber feature file

Can i know how to pass multiple parameters in the feature file(cucumber)..?我能知道如何在功能文件(黄瓜)中传递多个参数吗?

eg: i need to automate the links in the footer section of a website like there are more than 14 links in the section.例如:我需要自动化网站页脚部分中的链接,就像该部分中有超过 14 个链接一样。 Which way is good to pass those multiple parameters.哪种方式适合传递这些多个参数。

please help me请帮我

Using Secnario Outline you can pass multiple parameter.Below is the feature file example.使用 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         |
     | **************** | **********       |
     | **************** | **********       |
     | **************** | **********       |

You can try this to send multiple files with the cucumber feature in java.您可以尝试使用java 中的黄瓜功能发送多个文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Cucumber 功能文件中传递具有不同数量参数的多个示例 - How to pass multiple examples with different number of parameters in Cucumber feature file 如何在黄瓜的特征文件中进行迭代 - How to iterate in feature file of cucumber 如何在java或groovy中解析Cucumber特征文件? - How to parse Cucumber feature file in java or groovy? 如何从Jenkins读取Cucumber功能文件 - How to read Cucumber feature file from Jenkins 如何并行执行cucumber特征文件 - How to execute cucumber feature file parallel 格式化黄瓜功能文件 - Formatting Cucumber Feature file 如何使用为Cucumber JVM中的每个新运行设置的不同数据(语言)多次运行相同的功能文件 - How to run the same feature file multiple times with different data (language) set for every new run in Cucumber JVM 如何在运行文件中提供特征文件的路径 - how to give path of feature file in runner file 如何在运行时使用带有 io.cucumber 的最新黄瓜版本从特征文件中读取黄瓜特征名称 - How to read cucumber feature name from feature file during runtime using latest cucumber version with io.cucumber 如何将特定的java文件与黄瓜中的特定功能文件进行匹配 - How to match a specific java file with specific feature file in cucumber
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM