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.

Project setup

Project setup

In this lesson, we'll go ahead and set up our project for behavior-driven development. For that, we will use the Python behave package. It will allow us to write test for the features we write in plain English. So let's go ahead and install the same. In my terminal, I have created a virtual environment and activated the same. I can go ahead and install behave using pip install like this. Now that behave is installed, we can use the same in our project. Now, first of all, I will create a features directory like this, which will contain all of our features file. Inside of the same, we'll create another directory named steps which will contain the python code to implement the test for the created features now it's optional but you can go ahead and install the cucumber extension in vs code which will provide some syntax highlighting in our feature files and some language support for python and behave so go ahead and install the same okay now that the setup is done we can go ahead and…

Contents