TestKase
TestKase
|Docs
AutomateBrowserPlaywright

Coming from Selenium

Moving tests from Selenium to Playwright — the three things you must change, and everything that stays the same.

Both run the same browsers on the same machines. Your sessions, videos and results look identical.

Three things change. Two of them change quietly, so read those first.

Change 1 — turn your logs back on

On Selenium, console, network and driver logs are on by default.

On Playwright they are off.

Your tests still pass after the move. You just get no logs when one fails. Ask for them:

"testkase:options": { console: true, network: true, driver: true }

Change 2 — move platformName, and always set it

On Selenium it sits next to browserName. Here it goes inside testkase:options.

Leaving it out is worse here too. Selenium gives you the newest macOS. Playwright sends Chrome, Edge and Firefox to linux, and we have no Linux browsers. The session is refused.

"testkase:options": { platformName: "windows 11" }

Safari is the exception. It falls back to the newest macOS, because it cannot run anywhere else.

Change 3 — a different line for marking tests

driver.executeScript("testkase-name=…") does not exist in Playwright.

Use page.evaluate instead. See Marking tests.

What stays the same

Every one of these means what it meant before, and takes the same values:

accessKey · name · build · runId · tags · recording · resolution · idleTimeout · maxQueueWaitSeconds · tunnel

So does your session page, your video, your run grouping, and how many sessions you can run at once.

Side by side

SeleniumPlaywright
Addresshttps://x:[email protected]/wd/hubwss://hub.testkase.com/playwright?capabilities=…
Where the key goesIn the address, or accessKeyaccessKey only
How capabilities travelIn the request bodyOn the end of the address
platformNameNext to browserNameInside testkase:options
If you leave it outNewest macOSRefused, except for Safari
Console, network, driverOnOff
HeadlessRefusedWorks, but not with video
BrowsersChrome, Edge, Firefox, SafariThe same four
LanguagesSixFour
A refusalAn error messageA close code, like 4400

Which one should you use?

Stay where you are. Neither is faster, and both reach the same browsers.

Pick Playwright if you want headless runs or its built-in parallel runner. Pick Selenium if you need Ruby or PHP, which Playwright does not have.