Skip to content

bootstraponline/angular_webdriver

Repository files navigation

angular_webdriver

Gem Version Build Status Coverage Status Dependency Status

Angular enhancements to the Ruby webdriver bindings based on protractor.

Deprecated: Use angular/blocking-proxy instead.

Docs

See the docs folder for the documentation.

Testing

Tests run against protractor's testapp.

The latest versions of Chrome and Firefox are required. The tests will not run on old versions.

  • cd protractor/testapp; npm install
  • npm start Test app will start on http://localhost:8081/

Protractor CLI

Notes about protractor / angular testing.

--

Protractor's Element Explorer

  • npm install -g protractor Install protractor
  • webdriver-manager update Install webdriver jar
  • protractor --elementExplorer Start protractor repl
  • .exit Exit REPL session

View server logs

Startup selenium server using the jar or webdriver manager.

  • java -jar selenium-server-standalone-2.45.0.jar
  • webdriver-manager start

Start element explorer using the standalone server to see the logs (protractor v2.1.0 or newer).

protractor --elementExplorer --browser firefox --seleniumAddress http://127.0.0.1:4444/wd/hub

Alternatively, run from source:

node ./protractor/bin/webdriver-manager update

node ./protractor/bin/protractor --elementExplorer --browser firefox --seleniumAddress http://127.0.0.1:4444/wd/hub

browser.get('https://angularjs.org/')

Run individual protractor test

  • cd protractor/; node lib/cli.js spec/basicConf.js

Modify basicConf to target only the single spec.

specs: [
  'basic/synchronize_spec.js'
],

Modify environment.js to default to firefox.

'browserName':
    (process.env.TEST_BROWSER_NAME || 'firefox'),

Make sure the test app is running.

Installing node

Use nvm to manage node versions

  • brew install nvm Update ~/.bash_profile as instructed
  • nvm install stable Install latest stable version of node
  • nvm alias default stable Set stable as the default node for new terminals

About

Ruby wrapper for Protractor's client side JavaScript

Resources

Stars

Watchers

Forks

Packages

No packages published