Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Example does not work #161

Open
j-5-s opened this issue Jul 8, 2016 · 3 comments
Open

Example does not work #161

j-5-s opened this issue Jul 8, 2016 · 3 comments

Comments

@j-5-s
Copy link

j-5-s commented Jul 8, 2016

Is anyone else having issues with the example? It looks like the webdrivercss callback is getting called before it completes. The err and the res objects are undefined and no screenshot is saved. I've created an example repo here to reproduce.

https://github.com/jamescharlesworth/webdrivercssexample

@niedzielski
Copy link

@jamescharlesworth, maybe related to #156. I was able to get WebdriverCSS v1.1.10 and WebdriverIO v2.4.5 to work with ChromeDriver. PhantomCSS took a screenshot but didn't render well, but that might have something to do with the Polymer element I'm testing.

http-server -c-1&
chromedriver --url-base=wd/hub& # phantomjs -w&

From the example, test.js something like:

#!/usr/bin/env node
var webdriverio = require('webdriverio');
var webdrivercss = require('webdrivercss');

var client = webdriverio.remote({
  desiredCapabilities: {
    browserName: 'phantomjs'
  },
  port: 8910
}).init();

webdrivercss.init(client, {
  screenshotRoot: 'my-shots',
  failedComparisonsRoot: 'diffs',
  misMatchTolerance: 0.05,
});

client
  .url('http://localhost:8080/fixture.html')
  .webdrivercss('startpage', [
    {
      name: 'body',
      elem: 'body'
    }], function(err, res) {
    console.log(err);
    console.log(res);
  })
  .end();
./test.js

@hstorc
Copy link

hstorc commented Oct 27, 2016

@jamescharlesworth I am having the same issue. The Selenium ends before any
search for element.
The webdriverio without webdrivercss work well, though.
Did you solve this issue?

@hstorc
Copy link

hstorc commented Oct 28, 2016

if anyone else ever gets here..
I ignored the bold "WebdriverCSS isn't yet compatible with WebdriverIO v3.0" so stuff
weren't happening..
I added "webdriverio":"^v2.4.5" to the package.json dependancies and everything worked fine.
Nice tool BTW :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants