Skip to content

Commit

Permalink
js: Fix module loading on Windows
Browse files Browse the repository at this point in the history
Fixes #642
  • Loading branch information
jleyba committed Jun 15, 2015
1 parent e81ad1d commit b458a63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions javascript/node/selenium-webdriver/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v2.46.1

* Fixed internal module loading on Windows.

## v2.46.0

* Exposed a new logging API via the `webdriver.logging` module. For usage, see
Expand Down
3 changes: 3 additions & 0 deletions javascript/node/selenium-webdriver/_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ function Context(opt_configureForTesting) {
CLOSURE_BASE_PATH: path.dirname(CLOSURE_BASE_FILE_PATH) + '/',
CLOSURE_IMPORT_SCRIPT: function(src, opt_srcText) {
if (opt_srcText !== undefined) {
// Windows paths use backslashes, which must be properly escaped before
// evaluated with vm.runInContext.
opt_srcText = opt_srcText.replace(/\\/g, '/');
vm.runInContext(opt_srcText, closure, src);
} else {
loadScript(src);
Expand Down
2 changes: 1 addition & 1 deletion javascript/node/selenium-webdriver/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selenium-webdriver",
"version": "2.46.0",
"version": "2.46.1",
"description": "The official WebDriver JavaScript bindings from the Selenium project",
"keywords": [
"automation",
Expand Down

0 comments on commit b458a63

Please sign in to comment.