I'm trying to use Karma for testing my js scripts. In the doc it says I should set the environment variable for CHROME_BIN
:
I've set it to
%programfiles(x86)%"\Google\Chrome\Application\Chrome.exe
but when I type %CHROME_BIN%
in DOS, it fails as it's truncated to C:\Program
of the space in Program Files
.
What can I do to work around with this problem?
Was facing the same issue and I solved it by editing the karma.conf.js and karma-e2e.conf.js files which is under config directory.
Change:
browsers = ['Chrome'];
TO
browsers = ['Your_System_Path_where_chrome_installed/chrome.exe'];
in my case it was > C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
and then add C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
path to environment variables
or in cmd
SET CHROME_BIN = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Additional: Settings for other browsers can be seen here.
And about why chrome one is not working I guess they(Karma) have configured their chrome path from some earlier versions of chrome.
Update: For AngularJS tutorial Followers:
files = [ ANGULAR_SCENARIO, ANGULAR_SCENARIO_ADAPTER, .... .... // keep rest of the lines as it is .... ];
In Powershell you can run the following command:
$Env:CHROME_BIN = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
You need to replace the stuff within the double quotes with your local path.
Or in cmd.exe
SET CHROME_BIN = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
This is all you would need to get it going.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With