×
☰ See All Chapters

Cucumber Given

  • Given keyword is used provide the context.  

  • Given keyword is used provide the input to the functionality. 

  • Example: 

Feature: Login

  Scenario: Successful Login to the page

    Given I open Chrome browser

Cucumber When

  • When keyword is used provide action.  

  • This can be any action or any event like click, submit, navigate etc… 

  • Example: 

Feature: Login

  Scenario: Successful Login to the page

    Given I open Chrome browser

    When I navigate to login page

Cucumber Then

  • When keyword is used to describe the outcome of the functionality. 

  • Example: 

Feature: Login

  Scenario: Successful Login to the page

    Given I open Chrome browser

    When I navigate to login page

    Then Login page should be displayed

 


All Chapters
Author