webdriverio-boneyard / gulp-webdriver

gulp-webdriver is a gulp plugin to run selenium tests with the WebdriverIO testrunner
http://webdriver.io
MIT License
76 stars 33 forks source link

webdrive cannot cope with spaces in the path #26

Closed jimAScott closed 8 years ago

jimAScott commented 9 years ago

I am trying to use the gulp-webdriver in a path that sits under C:\program files\ I am getting an error saying that 'C:\Program' is not recognized as an internal or external command. When I move it to a location that has no spaces in the path it runs ok.

Unfortunately where I want to run it on the server has to have spaces in so is there a way of running this in a path with spaces?

dhoulker commented 9 years ago

I'm having the same issue - it looks like this is windows specific.

gutil.log('spawn wdio with these attributes:\n', args.join('\n')); var wdio = spawn(opts.wdioBin, args, { stdio: 'inherit' });

It looks like where spawn is called, the 'args' argument is the path to the wdio conf file. If that path contains a space then the error above occurs.

dhoulker commented 9 years ago

Incase this issue is affecting anyone else - we found a workaround.

The problem was specifically on our CI server, where we couldn't control the path from where the tests ran.

The tests were running from c:\program files\etc\etc\ and the space caused the issue. We found that if we cd'd to the short version C:\Progra~1\etc\etc\ before kicking off the tests everything worked fine.

hao-peng-sdl commented 8 years ago

Amazing workaround!

christian-bromann commented 8 years ago

I think this is resolved then.