Skip to content

Commit

Permalink
fix: setWindow
Browse files Browse the repository at this point in the history
  • Loading branch information
yihuineng committed Oct 11, 2023
1 parent 8be5b1b commit a9567c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions 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 All @@ -35,8 +36,9 @@ function *maximize(next) {
function *setWindow(next) {
const body = this.request.body;
const name = body.name;
const opts = body.opts;

this.state.value = yield this.device.setWindow(name);
this.state.value = yield this.device.setWindow(name, opts);
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 a9567c8

Please sign in to comment.