Closed yuriy-yarosh closed 9 years ago
This seems to be an WebdriverIO issue. I created an issue there. Let's continue this conversation there. Closing.
@christian-bromann Man, I have no problems passing extenisions in previous 0.1.1 version - it does not spawn any wdio processes with bulky stuff. So in 0.1.1 it was gulp-webdriver -> webdriverio.remote (& probably multiremotes should be added too) .spawn() -> webdriver instances. And it works fine with extensions 'cause it does not use shell to spawn a webdriver instance. In 1.0.0 it is gulp-webdriver .spawn() -> SHELL -> wdio -> webdriver instances We can't pass 200kb long command to the shell and it causes E2BIG error, which is not related to wdio/webdriverio itself.
I recommend to create temporary config file for wdio from all stuff that passed into gulp-webdriver plugin, with all extensions and other crap, and then pass it via shell to wdio as it does now. it's a bit clumsy, but definitely will work.
I just published a new version of WebdriverIO which should fix the problem. You need to specify the extension within your wdio.conf.js in your chrome capabilities. The child process will parse the config file and pick up your extension. Of course you can't set the extension in your gulp options but there is no need to do that since you can create multiple config files (which can inherit from a base config file).
So, currently extensions are injected into Webdriver as base64 strings from browser capabilities. 1.0.0 had been rewritten as a simple
wdio
process spawning, and this causes E2BIG error - there is no way such long args (200Kb+) can be passed to child process.Maybe it's better just to create a temporary config file for wdio, with all extensions as base64 strings in it, instead of passing opts as command line args ?