You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use Playwright driver along with channel, and also use run-workers, I get error like the browser exe file is not present at specific location and browser cannot be launched.
How to reproduce?
Create a demo codeceptjs project with playwright as driver.
In codecept.conf.js file add the channel property inside playwright object (add any property from here) OR use below code.
const{ setHeadlessWhen, setCommonPlugins }=require('@codeceptjs/configure');// turn on headless mode when running with HEADLESS=true environment variable// export HEADLESS=true && npx codeceptjs runsetHeadlessWhen(process.env.HEADLESS);// enable all common plugins https://github.com/codeceptjs/configure#setcommonpluginssetCommonPlugins();/** @type {CodeceptJS.MainConfig} */exports.config={tests: './*_test.js',output: './output',helpers: {Playwright: {browser: 'chromium',url: 'http://localhost',show: true,channel: 'msedge',}},include: {I: './steps_file.js'},name: 'demo-codecept'}
Command for execution
npx codeceptjs run-workers 2
Possible resolution way and reason for Error
The error comes when child processes are created for the parallel execution using run-workers. For windows operating system, the env variable are case-insensitive, which means process.env['PROGRAMFILES(X86)'] and process.env['ProgramFiles(x86)'] would produce same output. But inside the child process, only writing exact case only produces result. ex. process.env['ProgramFiles(x86)'] will produce correct output and anything other produces undefined.
Because of this it is not able to find the correct path at which the browser exe files are present.
Details
CodeceptJS version: 3.6.6
NodeJS Version: 22.11.0
Operating System: win32
playwright: 1.49.0
The text was updated successfully, but these errors were encountered:
What are you trying to achieve?
When I use Playwright driver along with
channel
, and also userun-workers
, I get error like the browser exe file is not present at specific location and browser cannot be launched.How to reproduce?
codecept.conf.js
file add thechannel
property inside playwright object (add any property from here) OR use below code.Command for execution
npx codeceptjs run-workers 2
Possible resolution way and reason for Error
The error comes when child processes are created for the parallel execution using
run-workers
. Forwindows
operating system, the env variable are case-insensitive, which meansprocess.env['PROGRAMFILES(X86)']
andprocess.env['ProgramFiles(x86)']
would produce same output. But inside the child process, only writing exact case only produces result. ex.process.env['ProgramFiles(x86)']
will produce correct output and anything other producesundefined
.Because of this it is not able to find the correct path at which the browser exe files are present.
Details
3.6.6
22.11.0
win32
1.49.0
The text was updated successfully, but these errors were encountered: