watir-ng 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +49 -0
- data/lib/watir-ng/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43a6acb2cf3a6015acafd569d2840c8974d390b8
|
4
|
+
data.tar.gz: 2d3954dac42ed1b2869e87a46270fe46a8f77e31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d413a38cebce9467f8cebc38c8ee75e9ddd1928b474adc2b98e98cc9b906bb8db46008a59123d3c1a64789dfcb834651e9080a8492c93b1a6b891f695a0646d
|
7
|
+
data.tar.gz: 99e89da5e126dcbb1c7d06f26a366a1e9edf5eedfe856fce770db136b01a702afe848fca0aa2987ab12aaec22232fecf7e05eee1e200220a154c1d53bb6f6925
|
data/README.md
CHANGED
@@ -1,4 +1,53 @@
|
|
1
1
|
# watir-ng
|
2
|
+
[](http://badge.fury.io/rb/watir-ng)
|
2
3
|
[](https://travis-ci.org/jdenen/watir-ng)
|
3
4
|
|
4
5
|
Identify [watir-webdriver](http://github.com/watir/watir-webdriver) elements with AngularJS [ng](https://docs.angularjs.org/api/ng/directive) directives.
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
Require `watir-ng` anywhere you'd instantiate a browser instance and `watir-ng` will patch directive identifiers onto `Watir::HTMLElement`.
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'watir-webdriver'
|
13
|
+
require 'watir-ng'
|
14
|
+
|
15
|
+
browser = Watir::Browser.new :chrome
|
16
|
+
```
|
17
|
+
|
18
|
+
When identifying elements, use the `ng` directives like you would `id`, `class`, etc. Be sure to use underscores instead of dashes though!
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
# To find and click this HTML element:
|
22
|
+
# <button ng-click="foo">Submit</button>
|
23
|
+
|
24
|
+
submit_button = browser.button(ng_click: "foo")
|
25
|
+
submit_button.click
|
26
|
+
```
|
27
|
+
|
28
|
+
## Installation
|
29
|
+
|
30
|
+
Add this line to your application's Gemfile:
|
31
|
+
|
32
|
+
gem 'watir-ng'
|
33
|
+
|
34
|
+
And then execute:
|
35
|
+
|
36
|
+
$ bundle
|
37
|
+
|
38
|
+
Or install it yourself with:
|
39
|
+
|
40
|
+
$ gem install watir-ng
|
41
|
+
|
42
|
+
## Contributing
|
43
|
+
|
44
|
+
1. Fork it ( http://github.com/jdenen/watir-ng/fork )
|
45
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
46
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
47
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
48
|
+
5. Create new Pull Request
|
49
|
+
|
50
|
+
## Questions, Comments, Concerns
|
51
|
+
|
52
|
+
Find me on Twitter ([@jpdenen](http://twitter.com/jpdenen)) or write up an issue.
|
53
|
+
|
data/lib/watir-ng/version.rb
CHANGED