Month: March 2025

Playwright Tutorial for Beginners : Lesson 6

March 3, 2025
This is the final lesson in this introductory tutorial for Playwright where we look at executing tests. You have a number of options and ways to execute tests in Playwright. Your three main options for executing tests include: 1. execute within VS Code 2. execute with the Trace Viewer 3. execute from the command line We’re going to explore each of these options in the next few sections as well as look at how to debug and select browsers. Executing Playwright Tests in VS Code We’re in our Playwright project, in the Explorer view. You’ll see your individual tests can be executed by pressing the run tests button on the left hand side. However, if you created a new test...
Read more...

Playwright Tutorial for Beginners : Lesson 5

March 2, 2025
We've already seen how to write your first test in Playwright and how to record tests using the “Test Generator" tool. We've seen how to use the pick locator option on our web page to identify objects that we want to interact with too. However, there is another stand alone tool called the “Playwright Inspector". This very useful tool can be used to help you construct your tests and identify locators. This “Inspector" tool is not directly initialized from within Visual Studio Code. However, you can start it from a terminal using npx. Starting Playwright Inspector First open a terminal from within VS Codeview terminal. Then you need to execute this npx command: npx playwright codegen https://www.google.com Using the url...
Read more...