diff --git a/lib/runner.js b/lib/runner.js index 34ef9f56d..4f656aae1 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -265,7 +265,7 @@ var runTests = function() { global.$ = browser.$; global.$$ = browser.$$; global.element = browser.element; - global.by = protractor.By; + global.by = global.By = protractor.By; // Do the framework setup here so that jasmine and mocha globals are // available to the onPrepare function. diff --git a/spec/basic/lib_spec.js b/spec/basic/lib_spec.js index 7c3ef2c28..f08e3f1d2 100644 --- a/spec/basic/lib_spec.js +++ b/spec/basic/lib_spec.js @@ -11,6 +11,7 @@ describe('protractor library', function() { expect(protractor).toBeDefined(); expect(browser).toBeDefined(); expect(by).toBeDefined(); + expect(By).toBeDefined(); expect(element).toBeDefined(); expect($).toBeDefined(); });