简体   繁体   中英

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. 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.

     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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM