webdriverio-boneyard / wdio-devtools-service

WebdriverIO v4 service that enables DevTools functionality for you WebDriver session
http://webdriver.io
MIT License
26 stars 11 forks source link

Doesn't work with wdio launcher #2

Open sns45 opened 6 years ago

sns45 commented 6 years ago

I have set up the latest version of selenium-standalone with the latest selenium, chrome, and chromedriver. When I run the tests manually using wdio ./wdio.conf.js it runs perfectly BUT it does NOT run through webdriverio launcher. (Tests do no capture the network request params) Here's how I am using webdriverio launcher:

gulp.task('default', function(done) {
    var wdio = new Launcher(path.join(__dirname, 'wdio.conf.js'), conf.config);
    return wdio.run().then(function(code) {
        console.log(code);
    }, function(error) {
        console.error('Launcher failed to start the test', error.stacktrace);
        selenium.child.kill();
        process.exit(1);
    });
});

I don't know if this is related to wdio launcher, but it's just not running tests which are written using this service tool.

christian-bromann commented 6 years ago

Are you running your tests in Chrome v63 or higher?

sns45 commented 6 years ago

@christian-bromann Yes. I even tried setting the selenium standalone at local. Its working fine when I manually run the tests using wdio ./wdio.conf.js on chrome v63. But it doesn't run through the webdriverio launcher on the same version of chrome on same machine.

Please see it yourself by cloning my repo(Its hardly 20 lines of code and I have updated it with detailed instructions in README).

https://github.com/sns45/wdio-service-devtools-bug-demo

kshitijlampardterry commented 6 years ago

Doesn't work for me as well. Facing same issue. Not working with wdio launcher.

websuspenses commented 6 years ago

Using webdriverio launcher seems opening two windows at a time which is obstructing to capture the network data. Tried with new Launcher(path.join(__dirname, 'wdio.conf.js')); which opens one browser window and able to capture the network data.

parthmakadiya12 commented 6 years ago

@christian-bromann Mac 10.13 Node 9.11 Boilerplate project -- https://github.com/chalsxevior/e2e-js-selenium-boilerplate

happens same with yarn also and npm also.After removing wdio-devtools-service it works fime

screen shot 2018-10-02 at 21 49 52

(node:97647) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. (node:97647) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:9222 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1163:14) (node:97647) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:97647) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled willterminate the Node.js process with a non-zero exit code.