Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Issues with sourcing playwright.config.ts to VSC plugin and playwright test explorer #33796

Closed
MichalOlesiak opened this issue Nov 28, 2024 · 0 comments · Fixed by #34051
Assignees
Labels

Comments

@MichalOlesiak
Copy link

Version

1.49.0

Steps to reproduce

Setup Your playwright.config.ts as below to use Your local browsers installed.

  1. Have VSC playwright plugin installed
  2. Run npm install playwright@latest
  3. npm playwright install
const browserBinaryPath = process.env.BROWSER_PATH
? process.env.BROWSER_PATH
:{
linux:"path_to_local_browser",
darwin:"path_to_local_browser",
win32:"path_to_local_browser",
}[process.platform];

export default defineConfig({

DEFAULT SETUP HERE 

name: "chromium",
use: { ...devices['Desktop Chrome'],
        baseURL: process.env.BASE_URL,
        headless:true,
        launchOptions:{
          args:[
            "someArgsHere"
          ],
          executablePath: browserBinaryPath;
        }
       },

})
  1. Execute test from test explorer

Expected behavior

I would expect npx playwright test to take same playwright.config.ts as running from Test Explorer and execute the browser provided

Actual behavior

npx playwright test in terminal works fine and pickups right config

When tests are executed via test explorer they fail with:
Error: browserType.connect: Executable doesn't exist at: /default_path_to_browser_not_from_config

Additional context

There is need to use local browsers because none of Solutions provided worked

Environment

System:
OS: macOS Sonoma 14.7.1
CPU: Apple M3 Pro
Binaries:
Node: 21.7.3
npm: 10.5.0
npmPackages:
@playwright/test: 1.49.0
@MichalOlesiak MichalOlesiak changed the title [Bug]: D3MOT d3mot Niewidoczny Issues with sourcing playwright.config.ts to VSC plugin and playwright test explorer [Bug]: Issues with sourcing playwright.config.ts to VSC plugin and playwright test explorer Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants