Playwright on Sauce Labs
Playwright is a testing framework that you can use to test your web apps remotely on Sauce Labs Cloud using the saucectl
CLI.
Supported Languages
JavaScript and TypeScript are supported out of the box. Cucumber.js is not directly supported by Playwright. However, Playwright can be used as the backing automation framework. See this setup guide for more information.
System Requirements
Supported OS:
- Windows 10 / Windows 11
- macOS 10.15+
- Linux
Supported Testing Platforms
Sauce Labs supports the following test configurations for Playwright:
Playwright Version | Node.js Version | Supported Platforms | Supported Browsers | End of Life |
---|---|---|---|---|
1.39.0 | 20 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | November 7, 2024 |
Windows: 10, 11 | ||||
1.38.1 | 18 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | September 28, 2024 |
Windows: 10, 11 | ||||
1.37.1 | 18 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | August 31, 2024 |
Windows: 10, 11 | ||||
1.36.2 | 18 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | August 1, 2024 |
Windows: 10, 11 | ||||
1.35.1 | 18 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | June 16, 2024 |
Windows: 10, 11 | ||||
1.33.0 | 18 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | May 11, 2024 |
Windows: 10, 11 | ||||
1.31.1 | 16 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | Mar 01, 2024 |
Windows: 10, 11 | ||||
1.29.2 | 16 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | Jan 15, 2024 |
Windows: 10, 11 | ||||
1.28.1 | 16 | macOS: 11.00, 12, 13 | Chromium, Chrome, Firefox, Webkit | Nov 30, 2023 |
Windows: 10, 11 |
How to Get Started
- Quickstart: Use our demo repository to quickly set up and run a sample Playwright project and test to see the results.
- Run your own tests: Customize
saucectl
to run your existing tests just by modifying theconfig.yml
file for your project. - Incorporate
saucectl
in your pipeline: Playwright on Sauce supports CI integrations with Circle CI, GitLab, Jenkins, and GitHub Actions. - Run your tests in Orchestrate: Use
saucectl
to run tests with a containerized test runner.
Playwright Reporter for Sauce Labs
If you prefer to stay in Playwright, try the Playwright Sauce Labs Reporter. Connect to your Sauce Labs account from within your Playwright project to configure and run your tests directly from Playwright.
Limitations
Special Characters in Test Names
We recommend that you avoid the use of special characters when naming your tests. If your test name contains any special characters, your test may not run or its artifacts may not be visible in our platform.
Playwright 1.31.1 + Webkit + Sauce-Connect
When using Sauce-Connect, Webkit browser is unable to load any website that is hosted on the Internet. Local websites can still be loaded.
macOS 11 + Playwright 1.29+ + Webkit
Webkit is not working on macOS 11 since Playwright 1.29.0
Playwright + Cucumber
Based on current Playwright test runner implementation, there is no way to run Playwright test runner with Cucumber.
Playwright HTML Reporter + Trace Viewer
Because of a limitation in how assets are stored on our platform, configuring your tests to use the built-in HTML reporter and Playwright's Trace Viewer feature will not work as expected.
Chrome launchOptions
If you use project specific launchOptions
along with setting Chrome as the browser, you'll encounter the following error:
browserType.launch: Chromium distribution 'chrome' is not found at C:\Users\sauce\AppData\Local\Google\Chrome\Application\chrome.exe
This is because playwright's project specific settings override the global configuration that Sauce Labs provides during runtime. In this case, the location of the browser binary. Make sure that launchOptions
are not set when running on a Sauce VM.