diff --git a/lib/server/controllers/context.js b/lib/server/controllers/context.js index 092791b..11984b7 100644 --- a/lib/server/controllers/context.js +++ b/lib/server/controllers/context.js @@ -13,7 +13,8 @@ function *getContexts(next) { function *setContext(next) { const body = this.request.body; const name = body.name; - yield this.device.setContext(name); + const opts = body.opts; + yield this.device.setContext(name, opts); this.state.value = null; yield next; } diff --git a/lib/server/controllers/window.js b/lib/server/controllers/window.js index 5e44ce8..b388805 100644 --- a/lib/server/controllers/window.js +++ b/lib/server/controllers/window.js @@ -11,7 +11,8 @@ function *getWindows(next) { } function *getWindowSize(next) { - this.state.value = yield this.device.getWindowSize(); + const windowHandle = this.params.windowHandle; + this.state.value = yield this.device.getWindowSize(windowHandle); yield next; } diff --git a/package.json b/package.json index 5781f56..b84991f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webdriver-server", - "version": "1.3.0", + "version": "1.3.1", "description": "webdriver server", "keywords": [ "webdriver",