Search code examples
seleniumcucumberbdd

How to Pass " double quotes through Scenario outline example


How to pass double quotes through Cucumber Scenario Outline Example, When I type double quote in Example, Scenario step will be inactive. In below Scenario username"1 I am not able to pass. Anybody suggest how to pass double quote through Scenario Outline, Thanks.

 Scenario Outline:Login detail
        And I enter "<username>" and "<password>"
        Example:
        | username  | password  | 
        | username"1 | password1 | 
        | username2 | password2 |

Solution

  • You could try escaping the double quotes using back slash (i.e. ). Please check the following gif which shows how it is done using NoCodeBDD. However, I believe, the same should work in other script based tools like Cucumber.

    https://nocodebdd.live/examples-with-double-quotes

    Disclaimer: I created this product to speed up automation of BDDs without having to write any code. I would love to get some feedback on the product from the community. You can download a free version from https://www.nocodedd.com/download