Updated WebdriverIO API (#14945)

This commit is contained in:
Alexander Abashkin
2017-03-13 20:26:38 +03:00
committed by Mohamed Hegazy
parent 51d20b706f
commit 1f83e28d46
2 changed files with 1323 additions and 503 deletions

1815
webdriverio/index.d.ts vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,5 @@
/// <reference types="mocha" />
/// <reference types="chai" />
import {assert} from "chai";
@@ -34,12 +33,12 @@ describe("my webdriverio tests", function(){
this.timeout(99999999);
var client: webdriverio.Client<void>;
before(function(done){
client = webdriverio.remote({ desiredCapabilities: {browserName: "phantomjs"} });
client.init(done);
before(function() {
client = webdriverio.remote({ desiredCapabilities: { browserName: "phantomjs" } });
client.init();
});
it("Github test",function() {
it("Github test", function() {
client.url("https://github.com/");
var elementSize = client.getElementSize(".header-logo-wordmark");
@@ -111,7 +110,7 @@ webdriverio
.selectorExecute("//div", function(inputs: HTMLElement[], message: string) {
return inputs.length + " " + message;
}, "divs on the page")
.then(function(res){
.then(function(res: string) {
console.log(res);
})
.end();