Complete first behave step definition


Continue from the previous page where we wrote the behave scenario


1. Right Click on the steps folder and create new – python files (Alternately, you can also just select File and create “”)


2. If you imported the python_behave_template, the file “” is already present, so you don’t have to do anything here.

3. Copy paste the below code in the file “”

 4. Now right-click on feature in “first_behave.feature” and click “Run….feature file”.

You should notice that the feature will run successfully. A browser will pop up and close, which is fine. The output is as below




5. If you would like to run it from command line , do the following from the root of the project i.e. from “python_behave_template” directory. Running from command line will help us align with “Continuous Test Automation” in the future (also with continuous integration)


Summary: As you can see behave aligns very much with the Cucumber style of ATDD and so far, it looks exactly like cucumber on ruby OR cucumber-jvm on Java side. Good to go right !

Next we will write our first selenium based behave scenario

First behave Scenario