3 min read

OpenAI's Operator

Today, I watched a preview of OpenAI's new tool, the Operator, where a user gives a web-based task by chatting with AI, and the Operator autonomously browses the web, typing, clicking, and scrolling just like a human would to complete the web-based task.

Naming the tool Operator is brilliant it reminds me of the character Link as an Operator in the movie The Matrix. The Operator is a crewmember of a hovercraft that assists his fellow crewmembers with information on events, resources, and other protection while they are inside The Matrix. A crewmember would request to perform a task, and the Operator will execute it.

Link assisting his crewmembers over the call. Image source: matrix.fandom.com

When I was building the seller frontend app for www.suis.co a year ago, I wanted to ensure the UI functionality remained consistent throughout the development. To achieve this, I looked for a tool to automate UI testing early on and discovered Playwright. Playwright, an open-source automation library developed by Microsoft, is used for browser automation and end-to-end testing of web applications.

One of Playwright's standout features is Codegen, which opens a browser and a code editor at the same time. This allows you to perform actions in the browser while Playwright generates the corresponding actions as code in real-time. For instance, when I execute the command 'npx playwright codegen' in my terminal, Playwright launches a browser window and a code editor. (For the sake of brevity, some steps were skipped.)


šŸŒIn the Browser

  1. I go to the search bar and type "www.suis.co".
  2. On the website I click the "Get Started" button.

šŸ¤–In the Code Editor

Meanwhile, the Playwright automatically record my actions and write code lines as shown in the images below:

A browser window and code editor are opened by the Playwright.
I'm typing www.suis.co in the browser's search bar.
The browser goes to the website.
I'm clicking the "Get Started" button on the website.
The browser goes to the next website and the codes in the editor(right side) are entirely written by the Playwright.

If I run these codes in Playwright, it will open a browser and replicate my previous actions. Thatā€™s automation!

If someone removes the 'Get Started' button later in the development stage, it will throw an error stating that the button cannot be found when we run the test again.

You can also use Playwright to automate your regular repetitive web-based tasks.

The way I see it, the features of Playwright + ChatGPT = Operator.

I can't wait to see how Microsoft and Google will respond to OpenAI's new tool the Operator.