Skip to content

Commit

Permalink
fix: setContext (#62)
Browse files Browse the repository at this point in the history
* fix: setWindow

* fix: setContext
  • Loading branch information
yihuineng authored Oct 12, 2023
1 parent 8be5b1b commit 3b2478b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lib/server/controllers/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 2 additions & 1 deletion lib/server/controllers/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webdriver-server",
"version": "1.3.0",
"version": "1.3.1",
"description": "webdriver server",
"keywords": [
"webdriver",
Expand Down

0 comments on commit 3b2478b

Please sign in to comment.