DefinitelyTyped/types/chai-webdriverio/chai-webdriverio-tests.ts
Nikolai Orekhov 5b310b110f add types for chai-webdriverio (#21891)
* add types for chai-webdriverio

* fix lint warning and remove extra lint rules

* fix compilation

* added types from webdriverio

* try to fix build

* try to fix build
2018-01-02 17:36:22 -08:00

31 lines
676 B
TypeScript

import chai = require('chai');
import webdriverio = require('webdriverio');
import chaiWebdriverio = require('chai-webdriverio');
const options = {
desiredCapabilities: {
browserName: 'firefox'
}
};
const browser = webdriverio.remote(options);
chai.use(chaiWebdriverio(browser));
const selector = 'Hello, World!';
chai.expect(selector).to.be.there();
chai.expect(selector).to.be.visible();
chai.expect(selector).to.have.text(selector);
chai.expect(selector).to.have.text(/regex/);
chai.expect(selector).to.have.count(10);
chai.expect(selector).to.have.value('x');
chai.expect(selector).to.have.value(/regex/);
chai.expect(selector).to.have.focus();