Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore(webkit): make sure npx command is used from the wsl container (#38071)
Yury Semikhatsky7549558889c1
diff --git a/packages/playwright-core/bin/install_webkit_wsl.ps1 b/packages/playwright-core/bin/install_webkit_wsl.ps1index ed15e7608d..ccaaf1564d 100644--- a/packages/playwright-core/bin/install_webkit_wsl.ps1+++ b/packages/playwright-core/bin/install_webkit_wsl.ps1@@ -23,7 +23,7 @@ if [ ! -f "/home/$Username/node/bin/node" ]; thenmkdir -p /home/$Username/nodecurl -fsSL https://nodejs.org/dist/v22.17.0/node-v22.17.0-linux-x64.tar.xz -o /home/$Username/node/node-v22.17.0-linux-x64.tar.xztar -xJf /home/$Username/node/node-v22.17.0-linux-x64.tar.xz -C /home/$Username/node --strip-components=1- echo 'export PATH=/home/$Username/node/bin:$PATH' >> /home/$Username/.bashrc+ sudo -u $Username echo 'export PATH=/home/$Username/node/bin:\`$PATH' >> /home/$Username/.profilefi/home/$Username/node/bin/node cli.js install-deps webkitsudo -u $Username PLAYWRIGHT_SKIP_BROWSER_GC=1 /home/$Username/node/bin/node cli.js install webkitdiff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.tsindex e3fc2dc757..ce8a686e08 100644--- a/tests/library/playwright.config.ts+++ b/tests/library/playwright.config.ts@@ -81,9 +81,8 @@ if (mode === 'service2') {if (channel === 'webkit-wsl') {connectOptions = { wsEndpoint: 'ws://localhost:3777/' };webServer = {- command: 'wsl -d playwright -- npx playwright run-server --port=3777',+ command: 'wsl.exe -d playwright -- bash -lc \'/home/pwuser/node/bin/npx playwright run-server --port=3777\'',url: 'http://localhost:3777',- reuseExistingServer: !process.env.CI,};}