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.

Google sign in

Google sign in

Many websites require you to login before proceeding onto the main content. In this section we'll go ahead and learn how to login into such websites and then perform our task. That is authentication. So I have a terminal session opened up. We'll go ahead and start from the scratch. But I have gone ahead and imported playwright and started the same. Now I can go ahead and create a browser. We can use playwright and we'll use the Firefox driver because if you try to log in into your Google account with Chromium, then you may get an error message that is the browser is not safe and such like that. That's why I will go ahead and use the Firefox driver. will work just fine. We can launch in the headed mode that is headless, false, slo-mo let's say by 500 times and our browser is launched. We can create a page that is browser dot new page and we have our browser right here i will go ahead and resize the same page with set viewport size and we can just provide it some width and height now…

Contents