From the course: Playwright Python and Pytest for Web Automation Testing: Master Modern Web Testing with Playwright and Pytest in Python

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Define feature

Define feature

The first step of behavior driven development is to write down our features. We write down our features in a feature file, and the file just ends with a .feature extension. So inside of the features directory, we can create a new file, give it a name, and then end it with the dot feature extension like this. Now we can go ahead and name our feature the name it is that is we'll create a login feature so I can name it the same. Now before we continue I will give you a bit of context on the feature we are going to write that is all right a feature for a sample apps login which is coming from our ui testing playground now of course this is for example to better understand creating features what we will create is a feature login where we can input a username like this and then we can provide pwd as password and then if we hit login, we will get the welcome message. So let's go ahead and create a feature based off the same. So inside of our feature file, we define the same in plain English,…

Contents