Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WebdriverIO example with chai-as-promised.
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
var client = require('webdriverio').remote({
desiredCapabilities: {
browserName: 'phantomjs'
}
});
chai.use(chaiAsPromised);
chai.should();
chaiAsPromised.transferPromiseness = client.transferPromiseness;
// this doesn't work
client.getText('.foo').should.eventually.equal(client.getText('.bar'));
// what is a good way to do this?
client.end();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.