Cucumber Scenario Outline: Passing empty string “ ” as value in Examples table

前端 未结 1 1647
忘了有多久
忘了有多久 2020-12-29 11:56

I have a cucumber scenario outline in which Examples table I would like to pass an empty string (\" \") and line breaks (\\n \\n \\n) as value. I want to edit an textfield a

相关标签:
1条回答
  • 2020-12-29 12:10

    You only need to put the <columnName> between "" in your feature definition. Example:

    And I set name "<NewName>" for conversation
    

    In your step definition, the step could be annotated like as follows:

       @And("^And I set name \"([^\"]*)\" for conversation$")
       public void And_I_set_name_for_conversation(String newName) throws Throwable {
          ...
       }
    

    Hope it helps

    0 讨论(0)
提交回复
热议问题