Rayrun
← Back to Discord Forum

Use local chromium

Hello, i would like to use a local chromium installed in my project folder, where the executable "chrome.exe" is at "chromewin/chrome.exe", but when i'm entering the good path in this code : let browser = await chromium.launch({ executablePath: 'chromewin/' }); I still get the same error :

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^

browserType.launch: Failed to launch: Error: spawn ./chromewin ENOENT

And i don't get why, because when i set a wrong path, i get :

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^

browserType.launch: Failed to launch chromium because executable doesn't exist at meow/
    at C.. {
  name: 'Error'
}

I tryed with './chromewin/', without the slash at the end but i guess my code find the executable but can't run in somehow ? Hope someone can help me :/

This thread is trying to answer question "How can I use a local Chromium executable in my project folder with my JavaScript code?"

3 replies

Btw i tryed with the playwright chromium and the official chromium but that's the same issue for both

you need to set a path to the executable file, right now you set the folder.

Yeah i just fixed it, thanks..

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

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 luc@ray.run.