Skip to content

Commit

Permalink
[js] Add W3C compliant mappings for getting and setting the window po…
Browse files Browse the repository at this point in the history
…sition
  • Loading branch information
jleyba committed Aug 21, 2016
1 parent b7cea82 commit d18ba32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions javascript/node/selenium-webdriver/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
* Fixed a bug where the promise manager would silently drop callbacks after
recovering from an unhandled promise rejection.

### Changes for W3C WebDriver Spec Compliance

* Updated command mappings for [getting](https://w3c.github.io/webdriver/webdriver-spec.html#get-window-position)
and [setting](https://w3c.github.io/webdriver/webdriver-spec.html#set-window-position)
the window position.


## v3.0.0-beta-2

Expand Down
4 changes: 3 additions & 1 deletion javascript/node/selenium-webdriver/lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ const COMMAND_MAP = new Map([

/** @const {!Map<string, {method: string, path: string}>} */
const W3C_COMMAND_MAP = new Map([
[cmd.Name.MAXIMIZE_WINDOW, post('/session/:sessionId/window/maximize')],
[cmd.Name.GET_WINDOW_POSITION, get('/session/:sessionId/window/position')],
[cmd.Name.SET_WINDOW_POSITION, post('/session/:sessionId/window/position')],
[cmd.Name.GET_WINDOW_SIZE, get('/session/:sessionId/window/size')],
[cmd.Name.SET_WINDOW_SIZE, post('/session/:sessionId/window/size')],
[cmd.Name.MAXIMIZE_WINDOW, post('/session/:sessionId/window/maximize')],
]);


Expand Down

0 comments on commit d18ba32

Please sign in to comment.