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