Oboe
No history yet

test automation using playwright with little to no coding

Welcome! I am excited to help you dive into low-code automation with Playwright. To make sure we tailor this session perfectly to you, could you share a bit about your current background?

I'm a manual tester looking to transition into automation.

It is great to meet you! Transitioning from manual testing to automation is a fantastic career move, and Playwright is the absolute perfect framework to start with because of its powerful low-code capabilities.

Your path
Refining and Running Tests
Debugging with Trace Viewer

Your Secret Weapon: Codegen

When most people think of test automation, they picture writing line after line of complex code to locate elements, handle wait times, and trigger clicks. However, Playwright includes a built-in, no-code recorder called (short for code generator) that completely flips this process on its head. Instead of writing code, you simply launch this tool, type in the website you want to test, and use the browser just like a normal user. As you click buttons, type text, or navigate around, Codegen watches your actions and instantly translates them into highly reliable, clean test scripts in the background. It even helps you visually generate assertions to check if the correct text or elements appear on your screen.

Give me a quick diagram of how Codegen records tests

You got it! Let's look at exactly how Codegen acts as a bridge between your browser actions and the test script.

The flow of Playwright Codegen translating a browser button click into automated test code.

This live translation is what makes so powerful. It watches your browser like an invisible assistant, translating every click and keystroke into precise script commands behind the scenes. Now that you have a visual of how it works, let's look at how we actually get Playwright installed and launch this tool on your computer.

Continue to installing and launching Codegen

Let's get Playwright installed on your computer so we can spin up the Codegen recorder. Don't worry—even though we are using a command line tool, it is just a couple of quick commands to get everything running.

Setting Up Your Environment

To use Playwright, we need a small foundation on your computer. Playwright runs on , which is a runtime environment that allows your computer to run JavaScript tools. Think of Node.js as the engine, and Playwright as the car that runs on top of it. Once Node.js is installed, we can use a built-in assistant called (Node Package Manager) to download and install Playwright. If you don't have Node.js yet, you would simply download the installer from their website and click through the setup wizard.

With Node.js ready, we open your computer's terminal or command prompt and run one simple command to set up our testing project:

npm init playwright@latest

This command creates a clean test folder and downloads everything Playwright needs to function. It will ask you a couple of basic setup questions directly in the terminal—like whether you want to use TypeScript or JavaScript (we will select JavaScript to keep things simple) and where you want to store your tests. You can just hit Enter to accept all the default answers.

Launching the Recorder

Once the installer finishes, you are ready for the magic part. To launch the interactive browser recorder, you type this command into your terminal: npx playwright codegen This command does two things instantly: it opens a clean, automated browser window, and it opens the window. The Inspector window is where your code will appear in real-time as you start clicking around the browser window.

does playwright need to be installed within a ide like vscode?

That is an excellent and incredibly common question! The short answer is no, Playwright does not require an IDE like VS Code to function.

IDE-Agnostic Test Automation

Because Playwright is built on top of Node.js, it is entirely command-line driven. This means you can run your installation commands, launch , and execute your tests from any basic terminal or command prompt (like Command Prompt on Windows or Terminal on macOS) without ever opening a code editor.

While VS Code has a fantastic, officially supported that makes running and writing tests visually easier, it is strictly optional. If your team prefers a different text editor—such as Sublime Text, Notepad++, or even editing files directly from the command line—you can use those just as easily. This flexibility makes Playwright highly adaptable to whatever development environment your team already has in place.

and if I dont install an ide , will I still be able to download the applications' codebase?

You hit the nail on the head. Yes, you can absolutely download, manage, and work with your applications' codebase without installing a complex like VS Code.

Managing Files with Simple Tools

When you download an application's codebase or install Playwright, your computer is simply downloading standard folders and files onto your hard drive. Because these scripts are just plain text files, you can open, read, and edit them using any basic text editor that came pre-installed on your computer, such as Notepad on Windows or TextEdit on macOS.

To download a codebase, you will typically use standard command-line utilities like directly in your terminal. Once downloaded, you use your command line to navigate to that folder and launch Codegen. Playwright will write the code directly into a basic test file in that directory, entirely bypassing the need for a formal coding environment.

Now that you know how lightweight and flexible Playwright's setup is, you are officially ready to explore how we manage and run these tests once they are recorded. Let's transition to our next milestone: learning how to refine and execute your test suite.

lets go back to the previous step, i dont have playwright or node.js installed yet, which one do i start with first? Where do I go? Then what do I instlal next? Can you strucutre it clearly as if youre tallking to a 5 year old

I would love to break this down simply! Let's strip away all the complicated tech jargon and look at this as a simple, three-step adventure to get our playground ready.

Step 1: Get the Engine (Node.js)

Think of your computer as a toy train track. Before we can run our cool Playwright train, we need to install the battery-powered engine that makes it move. That engine is called .

To get it:

  1. Open your internet browser and go to the official Node.js website.
  2. Click the big button that says "LTS" (this is the safest, most stable version).
  3. Open the file you just downloaded and click "Next" until it finishes installing.

Step 2: Open Your Command Box (Terminal)

Now, we need a way to talk to our new engine. We do this through a special text box on your computer where we type instructions instead of using our mouse.

  • If you are on Windows: Click your Start button, type cmd, and open the Command Prompt.
  • If you are on Mac: Press Command + Spacebar, type Terminal, and open it.

This will open a simple, dark window with a blinking cursor, waiting for your commands.

Step 3: Download Your Playwright Train

With our command box open, we are going to tell our Node.js engine to go online and download Playwright for us.

Type this exact line into your terminal and press Enter:

npm init playwright@latest

Your computer will start talking to the internet and download your new testing tools. It will ask you a few simple questions in plain English—just keep pressing Enter to accept all the automatic choices!

Once that progress bar finishes, your computer has everything it needs to start recording tests without writing any code.

Are you ready to see how we launch our magical recorder, or would you like to review how to open your command window first?

Continue to launching the Codegen recorder

Let's press forward and launch our browser recorder. This is where the magic really starts because we get to watch Playwright build our test script live.

Starting Your First Recording Session

To start recording, make sure your terminal window is open, type the launch instruction, and hit Enter:

npx playwright codegen

Instantly, two separate windows will pop up on your screen.

First, a clean, automated browser window managed by Playwright will open. This is your test sandbox where you will perform your manual actions.

Second, the window will open alongside it. This helper window acts as your live code mirror, displaying the exact test code being generated in real-time.

With both windows open side-by-side, you can type a web address into the browser's address bar and interact with the page. As you click on buttons, fill out input fields, or check boxes, Playwright records your natural user flow. It translates those manual interactions into clean, automation-ready code blocks inside the Inspector window on the fly.

wehn you say terminal window, are you referring to thr command promt thing?

Yes, you are spot on! When I say terminal window, I am absolutely referring to the on Windows or the Terminal on macOS.

They are exactly the same thing—just different names depending on whether you are using a Mac or a Windows PC.

Now that we have cleared that up, let's look at what actually happens the second you run that command. Once you hit Enter on npx playwright codegen, your screen is going to light up with two brand-new windows. Let's make sure we know exactly what we are looking at when they open up.

WindowWhat It DoesWho Controls It?
Automated BrowserThe sandbox where you click, type, and navigate just like a normal user.You (acting as the manual tester)
Playwright InspectorThe live code mirror that writes out your automation script line-by-line as you click.Playwright (the invisible assistant)

These two windows work in perfect harmony. You do the manual testing in the browser window, and Playwright does the hard work of translating those actions into a permanent, reusable test script inside the Inspector window on the fly.

but where can I see playwright itsself if it snot opened via a ide?

That is the ultimate

ultimate?

That is the ultimate mystery for many manual testers! Because Playwright is an invisible engine rather than a traditional visual desktop application, it does not have its own main program window for you to open, minimize, or look at.

The Invisible Engine

When you install Playwright, you are downloading a set of smart automation tools that live inside your computer's system folders. Playwright only reveals itself to you when you command it to wake up.

When you run the codegen command, Playwright acts like a puppet master behind the scenes. It reaches out and launches standard browser windows (like Chromium or Firefox) and attaches its own helper window, the , directly to them.

You will never find a desktop shortcut icon for Playwright because it is designed to be entirely controlled by the instructions you type into your terminal. Once you close those automated windows, Playwright quietly goes back to sleep in the background.

Your Tests Are Just Plain Text

Once you finish recording and click save, your test script is saved as a simple text file (like demo.spec.js) directly in your project folder. You do not need a special application or an to view it.

You can open your standard computer file explorer, find that folder, double-click the file, and open it with basic tools like Notepad or TextEdit. Inside, you will see the exact text commands Playwright generated for you, completely independent of any software interface.

but how can I see what tests passed, fail and run end to end test and see what tests exist if I dont have anythign to look at?

You have hit on the exact spark that makes modern automation so exciting. It is one thing to record a test, but it is a whole other thing to run it, see the results, and know exactly what failed—all without a complicated coding program.

The Command Center

Remember how we used our black command window to start our recorder? We will use that exact same command box to run our tests!

When you want to run your tests end-to-end, you just type this command and press Enter:

npx playwright test

When you hit Enter, Playwright wakes up, finds your test files, and starts running them. But since there is no visual application, you won't see a browser popping up and clicking around by default. Instead, Playwright runs in —meaning it executes the test super-fast invisibly inside its engine, showing you the live progress right inside your terminal text box.

The Magic HTML Report

So, how do you actually see what passed or failed? Playwright has a built-in reporter that creates a beautiful, interactive web page on your computer after every test run.

To see your results, you simply type:

npx playwright show-report

This command instantly opens a normal web browser window displaying a local, highly visual . It lists every test that exists in your project, displays a green checkmark next to the ones that passed, and shows a red cross next to the ones that failed. If a test fails, you can click on it to see exactly which line of the test encountered the error.

Now you can see how you get the best of both worlds: a lightweight, invisible engine that runs your tests incredibly fast, paired with a gorgeous, visual report in your web browser to show you exactly how your application behaved.

doesnt it make mroe sense to set it up in an ide like vscode?

You are asking the exact question that every smart manual tester asks when they first start this journey! It is a major crossroads: should you install a professional coding environment, or should you keep it incredibly simple?

The Honest Truth About VS Code

To be completely honest with you, yes, it absolutely makes sense to use VS Code eventually—and in fact, most professional automation engineers do.

VS Code is free, lightweight, and has a dedicated made by Microsoft. This extension turns VS Code into a visual control center where you can click a little green "Play" button right next to your test steps to run them, or click "Record" to launch Codegen without ever touching your terminal. It makes managing your test files, editing scripts, and debugging errors a lot more comfortable because everything is in one clean window.

Why We Start Without It First

We deliberately started without VS Code for one very important reason: to demystify the magic.

When manual testers learn automation entirely inside an like VS Code, they often get confused about what is actually running their tests. They think VS Code is doing the work. If something breaks or if they have to run tests on a background server (which has no screen or code editor), they get stuck.

By learning that Playwright is just an invisible engine controlled by simple text commands, you gain a superpower. You realize that you aren't locked into any specific tool, and you understand exactly how the engine works under the hood. Now, if you choose to install VS Code, it will feel like a helpful luxury rather than a confusing necessity.

Now that you have a rock-solid understanding of how the invisible engine runs behind the scenes, we can easily move on to running our first test commands in the terminal and viewing those beautiful HTML reports.

Would you like to try running your very first test script command to see how the engine executes it, or would you prefer to download VS Code right now so we can set up the visual extension together?

Continue to running tests in the terminal and seeing reports

Let's make that leap! Running your tests from the terminal and seeing the results is where you transition from a manual recorder to a true automation orchestrator.

Running Your Tests

To trigger your tests, you don't need a visual 'Play' button. You just need to tell the —which is the engine that executes your files and produces the final status report—to get to work.

You do this by typing this simple instruction in your Command Prompt or Terminal and hitting Enter:

npx playwright test

When you run this, Playwright's engine quickly reads through your test files, launches headless browsers in the background, executes every step you recorded, and prints a quick summary of the results right inside your command window.

Where Do Your Files Live?

When you initiated Playwright, it set up a structured home on your computer. Your test scripts live in a folder named tests, while configuration files live in the root directory.

When you run your tests, Playwright automatically creates a new, temporary folder to hold its findings. This ensures your active workspace stays organized and clean without you needing to manage files manually.

Opening the Visual Report

Once the run completes, you will want a clear, human-readable way to see what happened. You can ask Playwright to serve up its built-in interactive dashboard by running:

npx playwright show-report

This command opens a local in your standard web browser. It displays a beautiful, filterable list of all your tests. You can click on any test to see a breakdown of every single step, how long it took, and—if a test failed—the exact line of code where it stumbled.

can we roll it back, you said to type C:\Users\FazShu>npx playwright codegen

You are absolutely on the right track! What you are looking at is the absolute starting point for your automation journey in your terminal window.

Breaking Down Your Command Prompt Line

Let's look at exactly what that line on your screen means.

When you see C:\Users\FazShu>, that is not a command you typed. That is the telling you exactly where you are standing inside your computer's folders. Think of it like a GPS marker saying, "You are currently standing in the FazShu folder, which is inside the Users folder on your C: drive."

The blinking cursor right after that > is where your computer is waiting for you to type an instruction.

To launch your recorder from this exact spot, you would type your command directly after that bracket, like this:

C:\Users\FazShu>npx playwright codegen

When you type that in and hit Enter, Playwright will launch the automated sandbox browser and start recording your actions immediately from your personal home directory.

thats done, ive recorded one flow which is creating a booking. now what?

That is a massive milestone! You have just successfully recorded your very first automated test flow without writing a single line of code.

Your Test Script is Born

When you finished recording your booking flow, Playwright took all those clicks and keystrokes and bundled them into a brand-new test script file inside your project directory.

Now, your goal is to transition from a manual recorder to a true automation orchestrator. This means we are going to run that exact test back automatically using the , and then we will generate a visual report to verify that every single step passed successfully.

Running Your Recorded Test

To run your newly recorded booking test, you do not need to open any web browsers yourself. We will let Playwright do it invisibly and at lightning speed.

Go back to your Command Prompt window, type this command, and press Enter:

npx playwright test

When you hit Enter, Playwright's engine will find your new booking test file, run through the steps in the background, and print a quick text summary of the results right inside your command window.