I have the codeceptjs scripts which is working fine in windows, the same code I wanted to execute in the linux environment.
Since I don’t have node_modules in linux box, I planned to install webdriverion at run time and installed chrome driver. but its not working showing the below error message.
“before each” hook: codeceptjs.before for “MyScript” in 2705ms
Error: Can’t connect to WebDriver.
Error: Failed to create session.
unknown error: Chrome failed to start: exited abnormally.
Would you please help me to write the correct command in linux.
@ShyamN you need to start a selenium server before running the test
Thanks for your support @paulb.
I am able to run the selenium server. now I am facing new challenge.
I am executing all the linux commands serially. for example 1) I am downloading required files 2) installing the codeceptjs for webdriver 3) then I am running the selenium server and 4) I am trying to execute the codeceptjs script.
the new challenge is that, after running the selenium server, it is executing successfully. but my next step is not triggering (that is command to execute codeceptjs script is not executing) Since selenium server is running so the terminal is waiting until it is completed. so it is not moving to next task where I need to run codecept script using npx.
you can try adding
& to the end of starting selenium server command, this will help you move to next step.
npx selenium-standalone install && npx selenium-standalone start &
npx codeceptjs run
Thanks for your reply. Its very helpful @peterngtr