angular_webdriver 0.0.7 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +2 -0
  5. data/.travis.yml +32 -0
  6. data/Gemfile +2 -0
  7. data/Thorfile +33 -1
  8. data/angular_webdriver.gemspec +10 -3
  9. data/docs/overview.md +101 -0
  10. data/docs/sync.md +53 -0
  11. data/lib/angular_webdriver/protractor/by.rb +331 -0
  12. data/lib/angular_webdriver/protractor/by_repeater_inner.rb +106 -0
  13. data/lib/angular_webdriver/protractor/client_side_scripts.rb +1035 -0
  14. data/lib/angular_webdriver/protractor/protractor.rb +396 -77
  15. data/lib/angular_webdriver/protractor/protractor_element.rb +33 -0
  16. data/lib/angular_webdriver/protractor/rspec_helpers.rb +19 -0
  17. data/lib/angular_webdriver/protractor/watir_patch.rb +209 -0
  18. data/lib/angular_webdriver/protractor/webdriver_patch.rb +246 -0
  19. data/lib/angular_webdriver/version.rb +2 -2
  20. data/lib/angular_webdriver.rb +14 -1
  21. data/{LICENSE → license/angular_webdriver/LICENSE.txt} +0 -0
  22. data/{lib/angular_webdriver → license}/protractor/LICENSE.txt +0 -0
  23. data/{lib/angular_webdriver/protractor/get_url_trace.rb → notes/bootstrap_notes.md} +13 -0
  24. data/notes/element_by_id/element_by_id_sync_off.txt +12 -0
  25. data/notes/element_by_id/element_by_id_sync_on.txt +74 -0
  26. data/notes/element_chaining_debug.txt +94 -0
  27. data/notes/evaluate/js_evaluate_sync_on.txt +60 -0
  28. data/notes/evaluate/ruby_evaluate_sync_on.txt +35 -0
  29. data/notes/get_title/browser_get_title_sync_off.txt +11 -0
  30. data/notes/get_title/browser_get_title_sync_on.txt +54 -0
  31. data/notes/phantomjs.md +23 -0
  32. data/notes/protractor_cli_bugs.txt +39 -0
  33. data/notes/protractor_get/protractor_get.rb +102 -0
  34. data/notes/protractor_get/protractor_get_website_sync_off.txt +11 -0
  35. data/notes/protractor_get/protractor_get_website_sync_on.txt +86 -0
  36. data/notes/repeater/findAllRepeaterRows_annotated.txt +150 -0
  37. data/notes/repeater/findAllRepeaterRows_raw.txt +145 -0
  38. data/notes/repeater/findRepeaterColumn_annotated.txt +317 -0
  39. data/notes/repeater/findRepeaterColumn_raw.txt +310 -0
  40. data/notes/repeater/findRepeaterElement_annotated.txt +152 -0
  41. data/notes/repeater/findRepeaterElement_raw.txt +146 -0
  42. data/notes/repeater/findRepeaterRows_annotated.txt +156 -0
  43. data/notes/repeater/findRepeaterRows_raw.txt +152 -0
  44. data/notes/sync_after.md +46 -0
  45. data/notes/sync_notes.md +137 -0
  46. data/notes/synchronize_spec/status_gettext.txt +121 -0
  47. data/notes/synchronize_spec/status_gettext_x3.txt +451 -0
  48. data/notes/synchronize_spec/synchronize_spec.js.txt +74 -0
  49. data/notes/synchronize_spec/watir_gettext.txt +73 -0
  50. data/readme.md +52 -12
  51. data/release_notes.md +127 -0
  52. data/selenium_server/lib/logs.rb +50 -0
  53. data/selenium_server/lib/selenium_server.rb +21 -0
  54. data/selenium_server/readme.md +3 -0
  55. data/selenium_server/spec/logs_spec.rb +18 -0
  56. data/selenium_server/spec/nodejs_sync_spec_waithttp_annotated.txt +54 -0
  57. data/selenium_server/spec/nodejs_sync_spec_waithttp_raw.txt +367 -0
  58. data/selenium_server/spec/nodejs_sync_spec_waithttp_raw_processed.txt +43 -0
  59. data/selenium_server/spec/ruby_sync_spec_waithttp_annotated.txt +59 -0
  60. data/selenium_server/spec/ruby_sync_spec_waithttp_raw.txt +267 -0
  61. data/selenium_server/spec/ruby_sync_spec_waithttp_raw_processed.txt +39 -0
  62. data/selenium_server/spec/spec_helper.rb +6 -0
  63. data/selenium_server/spec/status_gettext_x3.txt +429 -0
  64. data/selenium_server/spec/status_gettext_x3_annotated.txt +86 -0
  65. metadata +91 -18
  66. data/lib/angular_webdriver/protractor/clientSideScripts.json +0 -19
  67. data/lib/angular_webdriver/protractor/clientsidescripts.js +0 -671
  68. data/lib/angular_webdriver/protractor/scripts.rb +0 -7
  69. data/lib/angular_webdriver/protractor/scripts_to_json.js +0 -11
  70. data/spec/protractor_spec.rb +0 -40
  71. data/spec/spec_helper.rb +0 -5
data/readme.md CHANGED
@@ -1,13 +1,19 @@
1
- # angular_webdriver [![Gem Version](https://badge.fury.io/rb/angular_webdriver.svg)](https://rubygems.org/gems/angular_webdriver)
1
+ # angular_webdriver [![Gem Version](https://badge.fury.io/rb/angular_webdriver.svg)](https://rubygems.org/gems/angular_webdriver) [![Build Status](https://travis-ci.org/bootstraponline/angular_webdriver.svg?branch=master)](https://travis-ci.org/bootstraponline/angular_webdriver/builds)
2
2
 
3
3
  Angular enhancements to the Ruby webdriver bindings based on [protractor](https://github.com/angular/protractor).
4
4
 
5
+ ## Docs
6
+
7
+ See the [docs](docs/) folder for the documentation.
8
+
5
9
  ## Testing
6
10
 
7
11
  Tests run against protractor's [testapp](https://github.com/angular/protractor/blob/19b4bf21525a683c8cc3ba21018c194cac9b6426/testapp/index.html).
8
12
 
9
- - `git clone git@github.com:angular/protractor.git`
10
- - `cd testapp; npm install`
13
+ The **latest** versions of Chrome and Firefox are required. The tests will
14
+ not run on old versions.
15
+
16
+ - `cd protractor/testapp; npm install`
11
17
  - `npm start` Test app will start on `http://localhost:8081/`
12
18
 
13
19
  ## Protractor CLI
@@ -18,22 +24,56 @@ Notes about protractor / angular testing.
18
24
 
19
25
  [Protractor's Element Explorer](https://github.com/angular/protractor/blob/master/docs/debugging.md)
20
26
 
27
+ - `npm install -g protractor` Install protractor
21
28
  - `webdriver-manager update` Install webdriver jar
22
29
  - `protractor --elementExplorer` Start protractor repl
23
30
  - `.exit` Exit REPL session
24
31
 
25
- View server logs
32
+ #### View server logs
33
+
34
+ Startup selenium server using the jar or webdriver manager.
35
+
36
+ - `java -jar selenium-server-standalone-2.45.0.jar`
37
+ - `webdriver-manager start`
38
+
39
+ Start element explorer using the standalone server to see the logs (protractor v2.1.0 or newer).
40
+
41
+ > protractor --elementExplorer --browser firefox --seleniumAddress http://127.0.0.1:4444/wd/hub
42
+
43
+ Alternatively, run from source:
44
+
45
+ > node ./protractor/bin/webdriver-manager update
46
+ >
47
+ > node ./protractor/bin/protractor --elementExplorer --browser firefox --seleniumAddress http://127.0.0.1:4444/wd/hub
48
+ >
49
+ > browser.get('https://angularjs.org/')
50
+
51
+
52
+ #### Run individual protractor test
53
+
54
+ - `cd protractor/; node lib/cli.js spec/basicConf.js`
55
+
56
+ Modify basicConf to target only the single spec.
57
+
58
+ ```
59
+ specs: [
60
+ 'basic/synchronize_spec.js'
61
+ ],
62
+ ```
63
+
64
+ Modify environment.js to default to firefox.
26
65
 
27
- - `java -jar selenium-server-standalone-2.45.0.jar` Startup selenium server
28
- - `nvm use v0.10.30`
29
- - `protractor --elementExplorer --seleniumAddress 127.0.0.1:4444 --browser firefox` Tell protractor to connect to it
66
+ ```
67
+ 'browserName':
68
+ (process.env.TEST_BROWSER_NAME || 'firefox'),
69
+ ```
30
70
 
31
- Known Issues:
71
+ Make sure the test app is running.
32
72
 
33
- - [protractor element explorer requires node v0.10.30](https://github.com/angular/protractor/issues/1890)
34
- - [node >0.10.30 is broken and 0.12 doesn't work at all](https://github.com/angular/protractor/issues/1970#issuecomment-89371944)
73
+ #### Installing node
35
74
 
36
75
  Use [nvm](https://github.com/creationix/nvm) to manage node versions
37
76
 
38
- - `brew install nvm` now update `~/.bash_profile` as instructed
39
- - `nvm install v0.10.30` Install proper version of node
77
+ - `brew install nvm` Update `~/.bash_profile` as instructed
78
+ - `nvm install stable` Install latest stable version of node
79
+ - `nvm alias default stable` Set stable as the default node for new terminals
data/release_notes.md CHANGED
@@ -1,3 +1,130 @@
1
+ #### v1.0.0 2015-06-06
2
+
3
+ - [8291152](https://github.com/bootstraponline/angular_webdriver/commit/82911526e99411420ef5bde4cc5dba652cc514ed) Release 1.0.0
4
+ - [d80a6d4](https://github.com/bootstraponline/angular_webdriver/commit/d80a6d4dd6d7ef386d174a688c545597b9433fd4) Fix successfully converts selenium elements to json
5
+ - [94e8796](https://github.com/bootstraponline/angular_webdriver/commit/94e8796a57378debc6c21bfbf4c893e435534f1f) Update selenium-webdriver to 2.46.2
6
+ - [4e22c74](https://github.com/bootstraponline/angular_webdriver/commit/4e22c7420356d4e1a3d96be7ad5866b4d6186ad7) Fix gem dependencies
7
+ - [d2c0cfb](https://github.com/bootstraponline/angular_webdriver/commit/d2c0cfb5f5d5efdd1929e3b0189f78c51e189bf1) Execute thor compare on Travis
8
+ - [b36d114](https://github.com/bootstraponline/angular_webdriver/commit/b36d11493d05d5fc2f244b42d71b53ec4942fcbe) Update compare_specs.rb
9
+ - [a912aaa](https://github.com/bootstraponline/angular_webdriver/commit/a912aaaa2ecc5210abb8985423697455b19c8a49) Run on local browser when remote doesn't exist
10
+ - [ed80fbd](https://github.com/bootstraponline/angular_webdriver/commit/ed80fbd7ecf1ca86da5f2f76bc11782799f71f2e) Update elements_spec
11
+ - [186618b](https://github.com/bootstraponline/angular_webdriver/commit/186618bbd56eeff88dbe08ae74b9cc11ca18b908) Compare JS describes to Ruby describes
12
+ - [1ff1018](https://github.com/bootstraponline/angular_webdriver/commit/1ff101831117616912bce7551ca7a627ce99666b) Fix spec
13
+ - [8e8baa8](https://github.com/bootstraponline/angular_webdriver/commit/8e8baa8a79e79dbff357f36b1cfa7fe348044fe2) Fix watir infinite retry
14
+ - [2612c7b](https://github.com/bootstraponline/angular_webdriver/commit/2612c7bf8aaba4ba24e4142d5bbf0752438c7bfe) Update tracing helper
15
+ - [e2f1b1d](https://github.com/bootstraponline/angular_webdriver/commit/e2f1b1d7933944b228f2980da28a09b056630c67) Finish ElementFinder tests
16
+ - [ab3d780](https://github.com/bootstraponline/angular_webdriver/commit/ab3d7802e643da3cc762f18b721596ccc4b2e269) Add watir element.locator
17
+ - [fdff1fe](https://github.com/bootstraponline/angular_webdriver/commit/fdff1feb577027ef8c58a6cdd36bf0802c1fc35d) Remove global/object methods
18
+ - [92cda8d](https://github.com/bootstraponline/angular_webdriver/commit/92cda8deda7ae418873f7e980c41824dd7a6f51c) Add by.deepCss
19
+ - [23f35ff](https://github.com/bootstraponline/angular_webdriver/commit/23f35ff5b7b541e18508108af4895970a3fdfcc3) Add by.exactBinding
20
+ - [192083a](https://github.com/bootstraponline/angular_webdriver/commit/192083ad041dc36a53ba908f369cbf1dc94c0ff4) Test present? and displayed?
21
+ - [5071dda](https://github.com/bootstraponline/angular_webdriver/commit/5071dda1e8991d7d9b2c67ae416eba43dcb74e37) Update locator docs
22
+ - [72643a2](https://github.com/bootstraponline/angular_webdriver/commit/72643a2b0a93a693ed84c0b0dc5673ae47a38ca4) Add by.repeater and by.exactRepeater
23
+ - [428aab9](https://github.com/bootstraponline/angular_webdriver/commit/428aab9830b008c1dde1f485d148386c653943b4) Add repeater notes
24
+ - [2fa09a0](https://github.com/bootstraponline/angular_webdriver/commit/2fa09a0e96bc464e5067e6f5becfa4bfa2b332e6) Refactor protractor_compatability into by & element
25
+ - [a27bbfe](https://github.com/bootstraponline/angular_webdriver/commit/a27bbfea09713fb821eafc28563957e5a09d56c8) Add by.cssContainingText
26
+ - [e23b615](https://github.com/bootstraponline/angular_webdriver/commit/e23b615c1d2b7ce01a28e3b6f8fcda7a4b4aa4cd) Add by.options
27
+ - [44f7b67](https://github.com/bootstraponline/angular_webdriver/commit/44f7b67bc13b292f8df06df038c89c3eacc87517) Update docs
28
+ - [353e14e](https://github.com/bootstraponline/angular_webdriver/commit/353e14e60209d1622a3b7c3538d811673db8e466) Add by.model
29
+ - [67641fe](https://github.com/bootstraponline/angular_webdriver/commit/67641feb3e772f10f75768144eccc84522ed00ec) Add by.buttonText
30
+ - [8ff4393](https://github.com/bootstraponline/angular_webdriver/commit/8ff43934051f2ce87256e067d315a0d2f16eec00) Rename set_wait to set_max_wait
31
+ - [3515f6b](https://github.com/bootstraponline/angular_webdriver/commit/3515f6b5fa0e36fe8fb5917f78a4c6411d491475) Document evaluate method
32
+ - [d1be5cb](https://github.com/bootstraponline/angular_webdriver/commit/d1be5cbb44a21eb83e8e1dc11ca191ec0cd8cc41) Document protractor semantics
33
+ - [70636cf](https://github.com/bootstraponline/angular_webdriver/commit/70636cf658ecb5477b544e5daf8ecb6408415a0a) Add find by partialButtonText
34
+ - [1f5382e](https://github.com/bootstraponline/angular_webdriver/commit/1f5382e768d73e500b5723063efd253f6e9c7e86) Refactor spec helpers. Move patches out of spec
35
+ - [74a999b](https://github.com/bootstraponline/angular_webdriver/commit/74a999b93e0b20daa43e87bcbf93ffb1182ec380) Add evaluate
36
+ - [c37f0cb](https://github.com/bootstraponline/angular_webdriver/commit/c37f0cb3c5529a485b98f04b029c1326a48414f1) Add evaluate notes
37
+ - [cccfd09](https://github.com/bootstraponline/angular_webdriver/commit/cccfd09b2b79b309a7a10fa10a71635ca41ea6cd) Link Travis badge to build history
38
+ - [14a1f8f](https://github.com/bootstraponline/angular_webdriver/commit/14a1f8f9e245374b8ac635f997fa4218fb6fb38b) Set page load timeout. Add phantomjs note
39
+ - [ee18e45](https://github.com/bootstraponline/angular_webdriver/commit/ee18e456f3d5bddf28adcf3361a83f125c2c5c3f) Add client wait to replace implicit wait
40
+ - [527f5cb](https://github.com/bootstraponline/angular_webdriver/commit/527f5cbffd53d097a6c2a68e7aae875a02048289) Add testForAngular
41
+ - [9083fef](https://github.com/bootstraponline/angular_webdriver/commit/9083fefb38f64d811e4d78c126c33c332a3f36c1) Add allowAnimations and fix element.present?
42
+ - [a4bfa21](https://github.com/bootstraponline/angular_webdriver/commit/a4bfa21c3cdb8f4c5da92c361a4f740394fadec8) Use implicit wait for Protractor locators
43
+ - [d65091f](https://github.com/bootstraponline/angular_webdriver/commit/d65091f8a21c6ebb11954ef3ae9d7bcbcb93770c) Fix protractor syntax
44
+ - [bc3e5cf](https://github.com/bootstraponline/angular_webdriver/commit/bc3e5cf5fe3a046397b0cdf1a833928d4b6c16c8) Set 10 second implicit wait
45
+ - [9e7d5c7](https://github.com/bootstraponline/angular_webdriver/commit/9e7d5c7baae476de1826d0c42f864b03353250ca) Port basic/actions_spec
46
+ - [19a861d](https://github.com/bootstraponline/angular_webdriver/commit/19a861d59b0d329e03d80edbb560dd5a81d6c0d5) Move notes
47
+ - [9f5346e](https://github.com/bootstraponline/angular_webdriver/commit/9f5346e5763d392c6c9898d1d8ff597e2bd42c3d) Update protractor
48
+ - [bef8432](https://github.com/bootstraponline/angular_webdriver/commit/bef84326c210c5ae1326684f1ef7190e61875833) Fix angular_webdriver
49
+ - [a155cbc](https://github.com/bootstraponline/angular_webdriver/commit/a155cbc2db092e7329de9cdca827ae1acf20faf1) Add notes
50
+ - [f070aba](https://github.com/bootstraponline/angular_webdriver/commit/f070abaccda4f68163c4ac15b58abbb63d955299) Add txt logs
51
+ - [117c062](https://github.com/bootstraponline/angular_webdriver/commit/117c062707df0aac868cd371e69f99f6b9d2ddac) Remove internal method from docs
52
+ - [b1c71c1](https://github.com/bootstraponline/angular_webdriver/commit/b1c71c11637f8daba55594dbc3e135b75ecc6e3c) Update docs
53
+ - [d5e4ab7](https://github.com/bootstraponline/angular_webdriver/commit/d5e4ab7e3206492716bdeae129ab1df1feb84ecc) Link to docs
54
+ - [cf5706c](https://github.com/bootstraponline/angular_webdriver/commit/cf5706cca12fc98767938e9cf07f5ba8172b2849) Add docs
55
+ - [dd33a99](https://github.com/bootstraponline/angular_webdriver/commit/dd33a99f3c5fc55e59c7198a99b83978bfc2b79a) Clean up protractor_spec
56
+ - [f93df2f](https://github.com/bootstraponline/angular_webdriver/commit/f93df2f6c7d75c5022731af360bf8b100c4c49ef) Update comment style to match Selenium
57
+ - [5b1240d](https://github.com/bootstraponline/angular_webdriver/commit/5b1240d3f221fb15f869a698a055ce81da2d14d7) Default base_url to nil. Fix client_side_scripts test
58
+ - [44ba223](https://github.com/bootstraponline/angular_webdriver/commit/44ba22331b373318a7b868de6a74ca2030d96233) Test ignore_sync, client_side_scripts, and base_url
59
+ - [14e35b5](https://github.com/bootstraponline/angular_webdriver/commit/14e35b566434b8ae6c16ebbec61e9728746cfc26) Update test description
60
+ - [d6b141b](https://github.com/bootstraponline/angular_webdriver/commit/d6b141b993f91ec94adbfff79175c39e67fd3217) Test driver, reset_url, reset_url_for_browser
61
+ - [f2945ca](https://github.com/bootstraponline/angular_webdriver/commit/f2945cae5ec3d89b30ac7612035969622461480f) Test debugger
62
+ - [1342439](https://github.com/bootstraponline/angular_webdriver/commit/13424399f01d4e1518507875de202aaab94f205a) Test executeScript_
63
+ - [70c9813](https://github.com/bootstraponline/angular_webdriver/commit/70c9813a06ec4ff4b1346ceeab399c9a815bb10b) Test executeAsyncScript_
64
+ - [110d551](https://github.com/bootstraponline/angular_webdriver/commit/110d551ff30910f852dd4728001841a89b6be873) Test _js_comment
65
+ - [a6a0cde](https://github.com/bootstraponline/angular_webdriver/commit/a6a0cde85a477cff5a57177d65063fd1c63fd269) Test method sync
66
+ - [b30e006](https://github.com/bootstraponline/angular_webdriver/commit/b30e006ce70d63eaec7633d78f0bf3e119d1bb0b) Test getLocationAbsUrl
67
+ - [b6ebe5d](https://github.com/bootstraponline/angular_webdriver/commit/b6ebe5d6c4164f9cf9a8981627023a71dfea4d55) Fix setLocation
68
+ - [d0cf2f5](https://github.com/bootstraponline/angular_webdriver/commit/d0cf2f56c2ac3326f044a83d5df69e06b7b34c06) Update .travis.yml
69
+ - [83c10d8](https://github.com/bootstraponline/angular_webdriver/commit/83c10d89339ade55785a60050bb660d2336eda69) Update .travis.yml
70
+ - [2bc9785](https://github.com/bootstraponline/angular_webdriver/commit/2bc97851593bace12a7c60d692084ea046ae080c) Add more specs
71
+ - [0ac13fc](https://github.com/bootstraponline/angular_webdriver/commit/0ac13fc8f26a2fdee1badc7a414b87619965b767) Update client side scripts
72
+ - [a4bad05](https://github.com/bootstraponline/angular_webdriver/commit/a4bad05a08a7ca7339dc1c3dc0190c0c565d0863) Fix specs
73
+ - [2230374](https://github.com/bootstraponline/angular_webdriver/commit/2230374e116893d4ce654b9c7e787fb8e9c19377) Port more protractor code
74
+ - [b5581ec](https://github.com/bootstraponline/angular_webdriver/commit/b5581ec4b4c02cb209e24c51d2a36e81d63ce63b) Update readme.md
75
+ - [bd842d1](https://github.com/bootstraponline/angular_webdriver/commit/bd842d1157d7ac6d5faa39f9c3aff732d5c5af79) Update readme.md
76
+ - [0d36ce7](https://github.com/bootstraponline/angular_webdriver/commit/0d36ce7865371e6dbb1f5c53a3bb5f7cfc20f5ef) Attach protractor instance to selenium driver
77
+ - [b8c5b49](https://github.com/bootstraponline/angular_webdriver/commit/b8c5b49c9ee098ab1ae061af6fb696a88c035ef6) Update notes
78
+ - [486831b](https://github.com/bootstraponline/angular_webdriver/commit/486831ba8514c9b506182760478ab6cf12d8b18a) Update readme.md
79
+ - [c56f860](https://github.com/bootstraponline/angular_webdriver/commit/c56f86014f763c2aa545cfc72cbe5f628dd791fd) Update readme for new protractor
80
+ - [4d64b90](https://github.com/bootstraponline/angular_webdriver/commit/4d64b9011a07ecb2c5169fee1115bb6ba6241700) Update .travis.yml
81
+ - [2e9b3c2](https://github.com/bootstraponline/angular_webdriver/commit/2e9b3c2da2d677968a1559b9e0bf39f090da18f8) Update .travis.yml
82
+ - [1056d51](https://github.com/bootstraponline/angular_webdriver/commit/1056d510d69a3f60f2141275cef550289d020d26) Update client side scripts
83
+ - [ee32a15](https://github.com/bootstraponline/angular_webdriver/commit/ee32a15187869b54062fe536145f12c8b2901bd5) Update protractor
84
+ - [e3fd4e0](https://github.com/bootstraponline/angular_webdriver/commit/e3fd4e021e9ab4e18177f5689c8ba0a2e17a1418) Update readme.md
85
+ - [40c6a36](https://github.com/bootstraponline/angular_webdriver/commit/40c6a36e8472307181887c98c966ee2794e6ef2e) Execute thor gen on Travis before thor spec
86
+ - [83fee9d](https://github.com/bootstraponline/angular_webdriver/commit/83fee9d666931155f7f61dab007ac02fde11f9fd) Fix client_side_scripts_spec
87
+ - [542b203](https://github.com/bootstraponline/angular_webdriver/commit/542b2030bd5e8729a34f437686e2ae2c3705b617) Require angular_webdriver/version
88
+ - [699aeba](https://github.com/bootstraponline/angular_webdriver/commit/699aeba3d2dfb180288ac0c1bbb8f35afeb7efdf) Exclude gen folder from gemfile
89
+ - [f6162ec](https://github.com/bootstraponline/angular_webdriver/commit/f6162ec489fac8577ba36a656438277620f5d119) Update generated files
90
+ - [bad85d4](https://github.com/bootstraponline/angular_webdriver/commit/bad85d4a9e992d5af6fd026772f819b2e3700b2f) Fix thor gen and add gen folder
91
+ - [aa5c630](https://github.com/bootstraponline/angular_webdriver/commit/aa5c6305d757d6a6a74ff01193a2d5a3b461063a) Update notes
92
+ - [fa837dd](https://github.com/bootstraponline/angular_webdriver/commit/fa837dd7f7781cbbad4d273d64eb8ca82bae806f) Move licenses to license folder
93
+ - [036f232](https://github.com/bootstraponline/angular_webdriver/commit/036f2323c5788e73621edc475c3c5726ae046045) Remove old files
94
+ - [4231f40](https://github.com/bootstraponline/angular_webdriver/commit/4231f404b60d0b72f78211ed9b99a6167254a20e) Restore npm install
95
+ - [98114b8](https://github.com/bootstraponline/angular_webdriver/commit/98114b864c976ea1637f62e9264d1b190d040081) Test on local firefox instead of remote
96
+ - [db0e187](https://github.com/bootstraponline/angular_webdriver/commit/db0e187c2523c55c993f705f30ec53e05f50ed01) Update .travis.yml
97
+ - [a823e56](https://github.com/bootstraponline/angular_webdriver/commit/a823e56196b43883a04b3b1d22064a0db609a785) Update .travis.yml
98
+ - [001abdb](https://github.com/bootstraponline/angular_webdriver/commit/001abdbb4ee07a2a900b40189d04dc3dbd7ae497) Update .travis.yml
99
+ - [4c57ccf](https://github.com/bootstraponline/angular_webdriver/commit/4c57ccf62104740cbe173d7e3d9664ae9e08d082) Update .travis.yml
100
+ - [dd1a028](https://github.com/bootstraponline/angular_webdriver/commit/dd1a028b91a768b4dc2c851e3dad7f6b54154ef6) Update .travis.yml
101
+ - [6de0748](https://github.com/bootstraponline/angular_webdriver/commit/6de0748faef9ae2a5bef715cdfc5bc0c9892ba51) Update .travis.yml
102
+ - [f278745](https://github.com/bootstraponline/angular_webdriver/commit/f278745da5d135ff433bd3ee8bf45e48ddb894a1) Update .travis.yml
103
+ - [9eab2f1](https://github.com/bootstraponline/angular_webdriver/commit/9eab2f18814bb6cdc28e2c17f30f1b65257ad183) Update node to 0.12
104
+ - [61589d3](https://github.com/bootstraponline/angular_webdriver/commit/61589d37a1b4824a4e43434c96aa4bbc0d0241fb) Update .travis.yml
105
+ - [af524a9](https://github.com/bootstraponline/angular_webdriver/commit/af524a94ac8329c616c78a6b07d8b34d65a6689f) Update travis to start Protractor testapp server
106
+ - [961e2b4](https://github.com/bootstraponline/angular_webdriver/commit/961e2b4b3664583e6808de750a77ba56bc635420) Add find by binding
107
+ - [a64c389](https://github.com/bootstraponline/angular_webdriver/commit/a64c389e29c0d77bae2946e63acfbfe14b6e6c63) Update readme.md
108
+ - [f5bb50e](https://github.com/bootstraponline/angular_webdriver/commit/f5bb50e68333827c083d5dcc972c1d7e229b93b9) Update whitespace removal
109
+ - [ff259c6](https://github.com/bootstraponline/angular_webdriver/commit/ff259c6a492d700151cc6d6dc82a3f11d14a6dd2) Use /* */ for comments instead of //
110
+ - [de2aa2d](https://github.com/bootstraponline/angular_webdriver/commit/de2aa2d4e31388db3bf18c36432f8151be0df990) Exclude protractor submodule from gem
111
+ - [231d588](https://github.com/bootstraponline/angular_webdriver/commit/231d588882235e3c6415eb18702a99e24eccbbc8) Add protractor as submodule
112
+ - [eaef06a](https://github.com/bootstraponline/angular_webdriver/commit/eaef06a8037fc43b8349556afd22337d83a58414) Test client side scripts
113
+ - [7da6eae](https://github.com/bootstraponline/angular_webdriver/commit/7da6eae37a70bc6931d424225f0416da92f7cbfe) Define attr readers
114
+ - [2971c56](https://github.com/bootstraponline/angular_webdriver/commit/2971c56612c1439e3c261c7e1c8d66a40b50b51b) Remove ostruct
115
+ - [6ea09f0](https://github.com/bootstraponline/angular_webdriver/commit/6ea09f0eef3be69fbc4104ce31adc8aa62bda9bc) Convert json to ruby
116
+ - [93cef89](https://github.com/bootstraponline/angular_webdriver/commit/93cef8986ac7ad3b5f66a0ed494c35fc9b2b3801) Always use wait with waitForAngular
117
+ - [794df2f](https://github.com/bootstraponline/angular_webdriver/commit/794df2fcf4f197cf48a8c654ce0321e62cac9b03) Add Travis badge
118
+ - [d04d710](https://github.com/bootstraponline/angular_webdriver/commit/d04d71084bfc11b9550dabd9caba3938a3fb1636) Fix tests
119
+ - [5d47395](https://github.com/bootstraponline/angular_webdriver/commit/5d47395fcf3b4169757fbdfc54c8498b6a8d6311) Add fail to test travis ci
120
+ - [67dea63](https://github.com/bootstraponline/angular_webdriver/commit/67dea636ca4ab77ffae37c82aed85123088fd07c) Try using xvfb
121
+ - [a6f835e](https://github.com/bootstraponline/angular_webdriver/commit/a6f835ef730c977ec75442fcb5538acd404c5fd2) Add nil driver check
122
+ - [19fde47](https://github.com/bootstraponline/angular_webdriver/commit/19fde47cb285431ce274a0b025736b105fada884) Update spec
123
+ - [2554992](https://github.com/bootstraponline/angular_webdriver/commit/25549924bc0d7c13deab1edcee7bcd681bde820c) Add thor spec
124
+ - [5ddfb2c](https://github.com/bootstraponline/angular_webdriver/commit/5ddfb2c3a979c9ed51b9fcb82ed9242b522f7f2f) Add thor to Gemfile
125
+ - [ca3db63](https://github.com/bootstraponline/angular_webdriver/commit/ca3db630e8baf04b722eb736839f6aef119b5e38) Create .travis.yml
126
+
127
+
1
128
  #### v0.0.7 2015-05-12
2
129
 
3
130
  - [8ad96c7](https://github.com/bootstraponline/angular_webdriver/commit/8ad96c7c6895502fb41f8e8930a5cd010f51dfef) Release 0.0.7
@@ -0,0 +1,50 @@
1
+ class Logs
2
+ # todo: write custom Java logger for selenium standalone
3
+ # so that the logging data isn't such a mess.
4
+ def self.process angular_log
5
+ angular_log = angular_log.split(/\r?\n/)
6
+
7
+ angular_log.each_index do |index|
8
+ line = angular_log[index]
9
+
10
+ # raw:
11
+ # 15:51:00.940 INFO [1] org.openqa.grid.selenium.GridLauncher - Launching a standalone server
12
+ #
13
+ # matched:
14
+ # "15:51:00.940 INFO [1] org.openqa.grid.selenium.GridLauncher - "
15
+
16
+ text_to_remove = line.match(/^\d{2}:\d{2}:\d{2}\.\d{3} [A-Z]+ \[\d+\] [^-]+ - /)
17
+
18
+ if text_to_remove
19
+ text_to_remove = text_to_remove.to_s
20
+ line = line.sub text_to_remove, ''
21
+
22
+ angular_log[index] = line
23
+ end
24
+ end
25
+
26
+ # now we have a giant blob of text
27
+ angular_log = angular_log.compact.join("\n")
28
+
29
+ match_script = lambda do |script, comment|
30
+ angular_log.gsub!(script, comment)
31
+ end
32
+
33
+ scripts = ClientSideScripts
34
+
35
+ # pattern match and gsub out the known client side scripts
36
+ match_script.(scripts.test_for_angular, 'Protractor.testForAngular')
37
+ match_script.(scripts.wait_for_angular, 'Protractor.waitForAngular')
38
+ match_script.(scripts.find_bindings, 'Protractor by.binding')
39
+
40
+ # .*? is a non-greedy match. will only match until the first 'Executing:'
41
+ # without ? it'll greedily match through multiple 'Executing:'
42
+ angular_log.gsub!(/(Done: .*?)\nExecuting:/m) do
43
+ full = Regexp.last_match[0] # full_match
44
+ group1 = Regexp.last_match[1] # group match
45
+ full.sub(group1, '').strip
46
+ end
47
+
48
+ angular_log
49
+ end
50
+ end
@@ -0,0 +1,21 @@
1
+ require 'rubygems'
2
+ require 'posix/spawn'
3
+
4
+ require_relative 'logs'
5
+
6
+ logfile = 'log.txt'
7
+ File.delete logfile if File.exist? logfile
8
+
9
+ # the driver logs are different (driver.manage.logs.get(:driver)),
10
+ # better to spin up the jar and read logs from the output file
11
+ cmd = "java -jar selenium-server-standalone-2.45.0.jar -log #{logfile}"
12
+
13
+ puts cmd
14
+
15
+ begin
16
+ POSIX::Spawn::Child.new cmd
17
+ rescue Interrupt
18
+ puts 'Server shutdown'
19
+ end
20
+
21
+ Logs.new(logfile).process
@@ -0,0 +1,3 @@
1
+ # selenium_server
2
+
3
+ Log processing utility for comparing angular.js runs across protractor and ruby.
@@ -0,0 +1,18 @@
1
+ require_relative 'spec_helper'
2
+
3
+ describe 'logs' do
4
+ it 'processes correctly' do
5
+ targets = ['ruby_sync_spec_waithttp_raw.txt', 'nodejs_sync_spec_waithttp_raw.txt']
6
+
7
+ targets.each do |target|
8
+ angular_log = File.read File.join __dir__, target
9
+
10
+ output_filename = target.sub(File.extname(target), '') + '_processed.txt'
11
+ output_file = File.join __dir__, output_filename
12
+
13
+ File.open output_file, 'w' do |file|
14
+ file.write Logs.process angular_log
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,54 @@
1
+ beforeEach(function() {
2
+ browser.get('index.html#/async');
3
+ });
4
+
5
+ it('waits for http calls', function() {
6
+ var status = element(by.binding('slowHttpStatus'));
7
+ var button = element(by.css('[ng-click="slowHttp()"]'));
8
+
9
+ expect(status.getText()).toEqual('not started');
10
+
11
+ button.click();
12
+
13
+ expect(status.getText()).toEqual('done');
14
+ });
15
+
16
+ ---
17
+
18
+ Executing: [new session: Capabilities [{count=1, browserName=firefox, version=ANY}]])
19
+ Creating a new session for Capabilities [{count=1, browserName=firefox, version=ANY}]
20
+ Executing: [set script timeoutt: 11000])
21
+
22
+ // get http://localhost:8081/index.html#/async
23
+ Executing: [get: data:text/html,<html></html>])
24
+ Executing: [execute script: window.name = "NG_DEFER_BOOTSTRAP!" + window.name;window.location.replace("http://localhost:8081/index.html#/async");, []])
25
+ Executing: [execute script: return window.location.href;, []])
26
+ Executing: [execute async script: Protractor.testForAngular, [10]])
27
+ Executing: [execute script: return (function () {
28
+ angular.module('protractorBaseModule_', []).
29
+ config(['$compileProvider', function($compileProvider) {
30
+ if ($compileProvider.debugInfoEnabled) {
31
+ $compileProvider.debugInfoEnabled(true);
32
+ }
33
+ }]);
34
+ }).apply(null, arguments);, []])
35
+ Executing: [execute script: angular.resumeBootstrap(arguments[0]);, [[protractorBaseModule_]]])
36
+
37
+ // waitForAngular, by.binding slowHttpStatus, get text
38
+ Executing: [execute async script: Protractor.waitForAngular, [body]])
39
+ Executing: [execute script: Protractor by.binding, [slowHttpStatus, false, null, body]])
40
+ Executing: [get text: 0 [org.openqa.selenium.remote.RemoteWebElement@777b0873 -> unknown locator]])
41
+
42
+ // waitForAngular, by.css ng-click slowHttp, click
43
+ Executing: [execute async script: Protractor.waitForAngular, [body]])
44
+ Executing: [find elements: By.cssSelector: [ng-click="slowHttp()"]])
45
+ Executing: [click: 1 [[FirefoxDriver: firefox on MAC (9b861296-469c-8343-bf13-3ea3a8727281)] -> css selector: [ng-click="slowHttp()"]]])
46
+
47
+ // waitForAngular, by.binding slowHttpStatus, get text
48
+ Executing: [execute async script: Protractor.waitForAngular, [body]])
49
+ Executing: [execute script: Protractor by.binding, [slowHttpStatus, false, null, body]])
50
+ Executing: [get text: 0 [org.openqa.selenium.remote.RemoteWebElement@777b0873 -> unknown locator]])
51
+
52
+ Executing: [delete session: 328e9486-cabe-4967-aefb-cee3ae3c250b])
53
+ Done: [delete session: 328e9486-cabe-4967-aefb-cee3ae3c250b]
54
+ Shutting down...