Loading…
Attending this event?
TPRC 2024 in beautiful Las Vegas, Nevada! June 25-27th.
Wednesday, June 26 • 11:30am - 11:50am
Modern browser automation in perl using playwright

Sign up or log in to save this to your schedule, view media, leave feedback and see who's attending!

Playwright the most full featured tool for automating the use of modern browsers, but is a node.js application. A means to utilize this in perl tests and scrapers is desirable, so I wrote playwright-perl. Let me show you the features!For more than a decade Selenium was the only real option for automating browsers, which is useful when you need to do anything needing a working javascript engine. This became increasingly necessary as many service providers either have no APIs, or maintain them incredibly poorly. There are also few other options for doing user acceptance testing on web applications.

A bit more than 3 years ago it became clear that Selenium as a standard had totally stagnated, as every new iteration of the standard came with less features than the last.

Both the driver vendors and SeleniumHQ's JAR to multiplex requests across various browser vendors were slow to implement standards, and would remove endpoints from prior versions with no replacement. On top of this, chromedriver (what drove the most popular browser) broke something important more or less every single release.

After getting tired of writing yet another polyfill in javascript to get around this nonsense with Selenium::Remote::Driver I looked around for options.

It turns out microsoft had these same problems and the resources to deal with them; they created a thing called 'playwright', which enables the same kind of cross-browser interface. On top of this, they implemented a bevy of useful things that Selenium had never implemented nor had on any roadmap anywhere.

So, I decided to implement a perl interface to this library, and in a way that massively limited my maintenance load, which I will briefly cover.
I also aimed for having the user experience be as close as possible to the way it was documented on playwright.dev without making it not feel like perl.
I believe I've achieved this and would like to share the features with you.Audience: All["Perl", "WWW", "Playwright"]

Speakers
avatar for George Baugh

George Baugh

Owner, Troglodyne LLC
General contractor specializing in all things perl


Wednesday June 26, 2024 11:30am - 11:50am PDT
Track 1

Attendees (3)