Am I missing something where playwright doesn't work properly on apple silicon? Chromium won't launch on apple silicon so none of the interactive features in VScode or others seem to work.
I can get tests to work with Chrome and others, but the VScode extension and others never successfully open chromium.
This thread is trying to answer question "Why is Playwright not launching Chromium on an M3 Mac and how can it be configured to use Chrome instead for recording tests in VSCode?"
I get this error each time
Error: Target page, context or browser has been closed
Browser logs:
<launching> /Users/jroy/pw-browsers/chromium-1091/chrome-mac/Chromium.app/Contents/MacOS/Chromium --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --enable-use-zoom-for-dsf=false --no-sandbox --app=data:text/html, --window-size=600,600 --window-position=1020,10 --test-type= --user-data-dir=/var/folders/6z/c02bry0x4fq3jdm3kc4gzzj40000gp/T/playwright_chromiumdev_profile-gSp3N3 --remote-debugging-pipe about:blank
<launched> pid=31681
telling playwright to use chrome doesn't seem to work for vscode or codegen.
projects: process.env.CI
? [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
{
name: 'firefox',
use: devices['Desktop Firefox'],
},
{ name: 'Mobile Chrome', use: devices['Pixel 5'] },
{ name: 'Mobile Safari', use: devices['iPhone 12'] },
]
: [
//Chromium does not work on my machine - so switching to chrome locally
{
name: 'chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
},
{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},
{
name: 'firefox',
use: devices['Desktop Firefox'],
},
{ name: 'Mobile Chrome', use: devices['Pixel 5'] },
{ name: 'Mobile Safari', use: devices['iPhone 12'] },
],
I opened the console and streamed the output when I tried to open it. I do have company managed security policies on this laptop but, I didn't see anything related in the output. I do see something about a syspolicy in there, I wonder if this is because the chromium app registers as an iOS build? Console output attached
I tried that and it didn't work, thus the custom location. Doesn't work either way. I think I've found a way around using default crhome, but it would be nice if the VSCode extension would use chrome instead of chromium for recording tests - it defaults to chromium no matter what is in the config file
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].