Open j-5-s opened 8 years ago
@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
@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?
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 :)
Is anyone else having issues with the example? It looks like the webdrivercss callback is getting called before it completes. The
err
and theres
objects are undefined and no screenshot is saved. I've created an example repo here to reproduce.https://github.com/jamescharlesworth/webdrivercssexample