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.

Install pytest-playwright plugin

Install pytest-playwright plugin

In the previous section, we learned about PyTest and how to use the same to write tests. We also learned about PyTest fixtures, which can be used to share some state or data between tests. And we'll use the same in this section. Now we'll go ahead and use the Playwrights PyTest plugin, which can be used to test web apps. first of all we will go ahead and install the plugin. So in our terminal we will go ahead and use pip to install pytest-playwright which is the playwright plugin for pytest. Hit enter it will go ahead and install the required packages. The playwright plugin for pytest provides a lot of useful fixtures and other things which can be used in our web app testing let's say we have a test module in which we want to test a website and we would like to do that using playwrights so we'll simply go ahead and import playwrights sync api of course you can use the async api as well but the point is we'll go ahead and say test a website which will require a page that is instead of…

Contents