Build a robot that does your boring web admin while you make a tea
Do the job once by hand: Playwright watches you log in, search and download, writes it down as a script, then repeats it for a whole list on its own. Free and open source, from Microsoft. You practise on a fake supplier portal first, so nothing real is touched.
- A Windows 11, Mac or Linux computer. Commands are shown for Windows PowerShell, with the Mac and Linux version next to them wherever they differ.
- About 850MB of free disk space. The robot's own browser is most of it, and step 1 shows how to skip that on Windows.
- No coding experience. You'll paste code, not write it. If the terminal is new to you, do the Terminal survival kit first.
Set up Playwright in its own folder
Playwright is the free tool that drives a web browser for you. It gets its own folder so it's easy to delete later.
Playwright is Microsoft's open-source tool for controlling a web browser with code (Apache-2.0, about 97,300 stars on GitHub). Developers use it to test websites. Here you'll use it to do a boring web job on repeat.
It works with Python or JavaScript. This mission uses Python: the scripts read almost like English, and a small tool called uv sets everything up in one folder with one command. Open PowerShell (search for it in the Start menu) and install uv if you don't have it. On a Mac or Linux, open Terminal instead:
Windows (only if you don't have uv)winget install --id astral-sh.uv -eMac or Linux (only if you don't have uv; on a Mac, brew install uv also works)curl -LsSf https://astral.sh/uv/install.sh | shClose the window and open a new one, so it finds uv. Then make a folder for your robot and add Playwright to it:
Windowsmkdir "$HOME\robot" cd "$HOME\robot" uv init uv add playwrightMac or Linuxmkdir ~/robot cd ~/robot uv init uv add playwrightOutputUsing CPython 3.12.13 Creating virtual environment at: .venv ... + greenlet==3.5.6 + playwright==1.63.0 + pyee==13.0.1 + typing-extensions==4.16.0It takes a few seconds. Now download the browser the robot will drive. It's a separate copy of Chrome, kept away from your normal browser and its passwords:
Terminaluv run playwright install chromiumOutputDownloading Chrome for Testing 153.0.8010.12 (playwright chromium v1243) from https://cdn.playwright.dev/... Chrome for Testing 153.0.8010.12 (playwright chromium v1243) downloaded to ...\chromium-1243 ... Chrome Headless Shell 153.0.8010.12 (playwright chromium-headless-shell v1243) downloaded to ...\chromium_headless_shell-1243This is the big one: 707MB, about a minute on a fast connection. You get two browsers: a normal window you can watch (433MB) and a "headless" one with no window, for running in the background (271MB). They live in
%LOCALAPPDATA%\ms-playwrighton Windows,~/Library/Caches/ms-playwrighton a Mac and~/.cache/ms-playwrighton Linux.TipShort on space? On Windows you can skip that download and let Playwright drive the Edge you already have. Add--channel msedgeto the recorder command in step 2 (the script it writes then uses Edge by itself), and in step 3 changep.chromium.launch(headless=HEADLESS)top.chromium.launch(headless=HEADLESS, channel="msedge"). Everything in this mission works the same with Edge, and the finished robot runs in about 8 seconds instead of 7.
uv run playwright --version prints Version 1.63.0 (or a newer number).If it breaks'uv' is not recognised (or "command not found: uv") + 2 more
'uv' is not recognised (or "command not found: uv")
Linux: the browser won't start and complains about missing libraries
uv run playwright install --with-deps chromium. It asks for your password because it installs system packages."Executable doesn't exist at ...chromium..." and a box saying "Looks like Playwright was just installed or updated"
uv run playwright install chromium from your robot folder.