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.

Running tests

Running tests

now that we have defined and implemented the feature steps in our Python file we can go ahead and run the same using the behave command that is in the terminal and while being in the root directory that has our features directory we can execute the behave command like this so we get an error that is type error after scenario takes one positional argument but two were given okay so inside of our environment.py the before scenario will take the scenario as well along with the context now because i don't use the scenario i will replace it with an underscore same for after scenario okay so that should fix the issue so i'll go ahead and clear the terminal and now i can run the same using behave command hit enter you can see we launch the browser perform the steps that is we fill in the details click the login button and we should expect the welcome message. So you can see the logs like this. Then we get one feature passed that is a total feature, one scenario passed in total and three…

Contents