Comments (12)
I use the v1.0.1 too and i've the same issue. But i use only webdriverio in my project.
Thanks for the trick.
from gulp-webdriver.
@electricmonk @FBerthelot does it work with v1.0.0
? On which platform are you running node?
from gulp-webdriver.
Seems that /^win/.test(process.platform)
returns a wrong value / cc @mhoyer
from gulp-webdriver.
@christian-bromann nope. I added opts.wdioBin
to the error message locally (might be a good idea to add it permanently) and it looked for the binary relative to gulp-webdriver
rather than relative to the project root. And it was not installed there, but rather in the project root.
edit: Regarding your previous comment, I'm running 0.12.7
on OS X 10.10.4. v1.0.0 also doesn't work.
from gulp-webdriver.
@christian-bromann : For me it work with v1.0.0
I run my test on a kubuntu 14.04.
from gulp-webdriver.
v1.0.1 works fine for me. (OS X 10.10.5)
from gulp-webdriver.
I just ran into this as well. Specifying the path to wdioBin
as @electricmonk suggested got me past this error and onto the next one!
from gulp-webdriver.
Ugh, I'm experiencing this issue as well now. Investigating…
from gulp-webdriver.
Ok, got it. The issue isn't caused by a specific change in webdriverio, it's caused by npm v3 flattening the dependency tree. So the binary is now located at node_modules/.bin/wdio
, but gulp-webdriver is still searching at node_modules/gulp-webdriver/node_modules/.bin/wdio
.
Anybody knows a reliable way to get the path to the executable?
from gulp-webdriver.
I had the same issue, using the following path didn't work either:
wdioBin: __dirname + '/node_modules/.bin/wdio'
because I was running my gulp tasks inside a child folder:
gulpfile.js
/gulp/tasks.js
This path worked for me, which is relative to the root directory:
wdioBin: './node_modules/.bin/wdio'
from gulp-webdriver.
Hi,
Looks like this issue is back on windows.
When the dependency tree is flattened, there correctly is a wdio
file in node_modules/webdriverio/bin/
as well as in node_modules/.bin/
, however the wdio.cmd
can only be found in node_modules/.bin/
.
So I get this error:
Cannot find module 'webdriverio\bin\wdio.cmd'
at Function.Module._resolveFilename (module.js:327:15)
at Function.require.resolve (internal/module.js:17:19)
I don't know if it comes from the way webdriver.io is published in latest version or from changes in npm, however I know that the problem only occurred when I upgraded node and npm (worked like a charm with node 4/npm 2).
It can be fixed in my case by pasting manually a modified wdio.cmd
in webdriverio\bin
but it's not pretty ^^'
However, I'm not sure it's possible to make a fix taking into account all combinations of os/npm versions
edit: I thought I could supply a different path through opts but it's not even the case in 1.0.2: it's the require.resolve which throws, and as it's called in every cases before merging the opts there's nothing I can do. So at the moment I had to revert back to 1.0.1 and then use:
wdioOpts = {wdioBin: require('path').join('./node_modules', '.bin', isWin ? 'wdio.cmd' : 'wdio')};
in my gulpfile as gulp-webdriver options. (working because I forced npm3 as engine and put the .gulpfile at the project root)
from gulp-webdriver.
The results are also different based on the version of webdriverio used. I'm using 2.4.5 to support webdrivercss:
npm uninstall webdriverio --save-dev
npm install [email protected] --save-dev
When using this version, I had to change gulp-webdriver index.js line to:
wdioBin = require.resolve(path.join('.bin', isWin ? 'wdio.cmd' : 'wdio'));
I would suggest gulp-webdriver should check for the version of webdriverio and modify it's approach!
from gulp-webdriver.
Related Issues (20)
- gulp end event not firing in 2.0.0 HOT 6
- Can not run gulp-webdriver twise HOT 1
- Cannot call before/after hook in additional arguments HOT 2
- Error: task completion callback called too many times HOT 2
- Still cannot use pageObject to reference click(); HOT 1
- Multiples issues after updating from 1.0.3 to 2.0.1 HOT 3
- Unhandled 'error' event when assertion fails HOT 5
- When tests fail gulp execution breaks HOT 1
- Error when starting session in chrome browser HOT 1
- Test hangs on failure... HOT 1
- Npm v2.0.2 does not match the github v2.0.2 HOT 2
- Help required with Appium example
- SIGINT handler is not killing process HOT 7
- init plugin before call init() HOT 2
- Selenium never stops HOT 2
- Running tests is not dependent on key --suite HOT 6
- Plugin does not successfully exit gulp task HOT 1
- Error: Cannot find module '../../build/index'
- Replace gulp-util HOT 3
- Update gulp-webdriver to support webdriverIO version 5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-webdriver.