Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/312.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在cucumber/Selenium中,当我想将多参数作为字符串传递时,我遇到了一个问题_Java_Selenium Webdriver_Cucumber_Cucumber Jvm_Gherkin - Fatal编程技术网

Java 在cucumber/Selenium中,当我想将多参数作为字符串传递时,我遇到了一个问题

Java 在cucumber/Selenium中,当我想将多参数作为字符串传递时,我遇到了一个问题,java,selenium-webdriver,cucumber,cucumber-jvm,gherkin,Java,Selenium Webdriver,Cucumber,Cucumber Jvm,Gherkin,我得到这个错误: 作为步骤[输入用户名和密码] ]在以下位置使用2个参数定义 '步骤防御。登录步骤防御。输入\用户名\字符串\用户名\和\密码\字符串\密码字符串,字符串 在文件:/C:/Users/hai/eclipse workspace/gherkins/bin/'中。但是, 小黄瓜步骤有0个参数 我的功能文件 在特定功能文件的步骤中尝试以下操作: 查看文档以了解更多信息。请编辑您的问题,使其更易于阅读步骤-@Grasshopper中的这部分内容是什么,这也是我关心的问题。我回答了下面的问

我得到这个错误:

作为步骤[输入用户名和密码] ]在以下位置使用2个参数定义 '步骤防御。登录步骤防御。输入\用户名\字符串\用户名\和\密码\字符串\密码字符串,字符串 在文件:/C:/Users/hai/eclipse workspace/gherkins/bin/'中。但是, 小黄瓜步骤有0个参数

我的功能文件

在特定功能文件的步骤中尝试以下操作:


查看文档以了解更多信息。

请编辑您的问题,使其更易于阅读步骤-@Grasshopper中的这部分内容是什么,这也是我关心的问题。我回答了下面的问题,以便他能解决它。我想他把{string}和。
Feature: Reset functionality on login page of Application

 Scenario Outline: Verification of reset button with numbers of credential
  Given Open the Chrome and launch the application          
  When Enter the Username <String,username> and  Password <String,password> 
  Then Reset the credential 

  Examples:                             
  |username  |password         |        
  |User1     |password1        |        
  |User2     |password2        |
When Enter the Username "<username>" and  Password "<password>"
@When("^Enter the Username \"([^\"]*)\" and Password \"([^\"]*)\"$")
public void enterTheUsernameAndPassword(String usnm, String pswd) {
     System.out.println("The username is: " + usnm);
     System.out.println("The password is: " + pswd);
}