angular_webdriver
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 startTest app will start onhttp://localhost:8081/
Protractor CLI
Notes about protractor / angular testing.
--
-
npm install -g protractorInstall protractor -
webdriver-manager updateInstall webdriver jar -
protractor --elementExplorerStart protractor repl -
.exitExit REPL session
View server logs
Startup selenium server using the jar or webdriver manager.
java -jar selenium-server-standalone-2.45.0.jarwebdriver-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 nvmUpdate~/.bash_profileas instructed -
nvm install stableInstall latest stable version of node -
nvm alias default stableSet stable as the default node for new terminals