Setting Up Playwright for Smoke Testing with WebKit on Riviera Industrial ERP
TL;DR: I added Playwright with WebKit to the Riviera Industrial ERP project for smoke testing, resolving a SyntaxError: Unexpected token '<' issue. This implementation enables reliable browser automation for our industrial ERP application.
The Problem
While working on the Riviera Industrial ERP project, I encountered an issue with setting up Playwright for smoke testing. The error message SyntaxError: Unexpected token '<' indicated a problem with the WebKit browser configuration. I needed to resolve this issue to ensure reliable browser automation for our application.
What I Tried First
Initially, I tried setting up Playwright with the default Chromium browser, but I wanted to test with WebKit as well. I installed Playwright and configured it according to the documentation. However, when I ran the smoke tests with WebKit, I encountered the SyntaxError: Unexpected token '<' issue.
The Implementation
To resolve the issue, I updated the playwright.config.js file to include the WebKit browser configuration:
// playwright.config.js
module.exports = {
browsers: ['webkit'],
// ... other configurations ...
};
I also updated the package.json file to include the smoke test script:
// package.json
"scripts": {
"smoke-test": "playwright test --browser=webkit"
}
In the smoke.test.js file, I added the test code to verify the application's homepage:
// smoke.test.js
import { test, expect } from '@playwright/test';
test('should load homepage', async ({ page }) => {
await page.goto('https://riviera-industrial-erp.com');
expect(page.url()).toBe('https://riviera-industrial-erp.com');
});
Key Takeaway
The key takeaway from this experience is the importance of configuring the browser correctly when setting up Playwright for smoke testing. In this case, I needed to update the playwright.config.js file to include the WebKit browser configuration, which resolved the SyntaxError: Unexpected token '<' issue.
What's Next
Next, I plan to add more smoke tests to cover different scenarios and ensure the reliability of our industrial ERP application. I also want to explore other browser automation tools, such as Cypress, to compare their performance and features.
vibecoding #buildinpublic #playwright #webkit #smoketesting #browserautomation
Part of my Build in Public series — sharing the real process of building SaaS projects from Playa del Carmen, México.
Repo: zaerohell/content-automation · 2026-07-07
#playadev #buildinpublic
Top comments (0)