druid-ts 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -7
- data/Gemfile +0 -5
- data/druid.gemspec +2 -1
- data/features/area.feature +0 -1
- data/features/audio.feature +0 -2
- data/features/bold.feature +0 -1
- data/features/canvas.feature +0 -2
- data/features/div.feature +0 -2
- data/features/heading.feature +0 -10
- data/features/italic.feature +0 -1
- data/features/label.feature +0 -2
- data/features/link.feature +0 -2
- data/features/list_item.feature +0 -2
- data/features/ordered_list.feature +0 -2
- data/features/paragraph.feature +0 -2
- data/features/span.feature +0 -2
- data/features/step_definations/element_steps.rb +2 -2
- data/features/step_definations/section_steps.rb +1 -1
- data/features/table.feature +0 -2
- data/features/table_cell.feature +0 -2
- data/features/unordered_list.feature +0 -3
- data/features/video.feature +0 -11
- data/lib/druid.rb +1 -5
- data/lib/druid/accessors.rb +2 -296
- data/lib/druid/assist.rb +1 -9
- data/lib/druid/elements/button.rb +0 -4
- data/lib/druid/elements/check_box.rb +0 -4
- data/lib/druid/elements/div.rb +0 -3
- data/lib/druid/elements/element.rb +3 -266
- data/lib/druid/elements/file_field.rb +0 -3
- data/lib/druid/elements/form.rb +0 -9
- data/lib/druid/elements/hidden_field.rb +0 -4
- data/lib/druid/elements/image.rb +0 -4
- data/lib/druid/elements/label.rb +0 -3
- data/lib/druid/elements/link.rb +0 -16
- data/lib/druid/elements/list_item.rb +0 -4
- data/lib/druid/elements/option.rb +0 -6
- data/lib/druid/elements/ordered_list.rb +0 -4
- data/lib/druid/elements/radio_button.rb +0 -3
- data/lib/druid/elements/select_list.rb +0 -26
- data/lib/druid/elements/span.rb +0 -4
- data/lib/druid/elements/table_cell.rb +0 -3
- data/lib/druid/elements/table_row.rb +4 -0
- data/lib/druid/elements/text_area.rb +0 -17
- data/lib/druid/elements/text_field.rb +0 -7
- data/lib/druid/elements/unordered_list.rb +0 -4
- data/lib/druid/page_populator.rb +15 -0
- data/lib/druid/version.rb +1 -1
- data/spec/druid/druid_spec.rb +1 -21
- data/spec/druid/elements/area_spec.rb +0 -8
- data/spec/druid/elements/bold_spec.rb +0 -9
- data/spec/druid/elements/button_spec.rb +0 -8
- data/spec/druid/elements/canvas_spec.rb +0 -9
- data/spec/druid/elements/check_box_spec.rb +0 -9
- data/spec/druid/elements/div_spec.rb +0 -9
- data/spec/druid/elements/element_spec.rb +6 -18
- data/spec/druid/elements/file_field_spec.rb +0 -9
- data/spec/druid/elements/form_spec.rb +0 -9
- data/spec/druid/elements/heading_spec.rb +0 -9
- data/spec/druid/elements/hidden_field_spec.rb +0 -9
- data/spec/druid/elements/image_spec.rb +0 -9
- data/spec/druid/elements/itatic_spec.rb +1 -10
- data/spec/druid/elements/label_spec.rb +0 -9
- data/spec/druid/elements/link_spec.rb +0 -16
- data/spec/druid/elements/list_item_spec.rb +0 -9
- data/spec/druid/elements/ordered_list_spec.rb +0 -9
- data/spec/druid/elements/paragraph_spec.rb +0 -9
- data/spec/druid/elements/radio_button_spec.rb +0 -9
- data/spec/druid/elements/select_list_spec.rb +0 -9
- data/spec/druid/elements/span_spec.rb +0 -9
- data/spec/druid/elements/table_cell_spec.rb +0 -9
- data/spec/druid/elements/table_row_spec.rb +0 -8
- data/spec/druid/elements/table_spec.rb +0 -9
- data/spec/druid/elements/text_area_spec.rb +0 -9
- data/spec/druid/elements/text_field_spec.rb +0 -9
- data/spec/druid/elements/unordered_list_spec.rb +0 -9
- data/spec/druid/page_populator_spec.rb +5 -3
- metadata +15 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f57ba956f9e60720171615d0c16b76b20bc61420
|
4
|
+
data.tar.gz: e99c9b3239b725f435b008a80bb18cdebdd848d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e49ccbed81c0e432c7242aa8bd798e616264756e1b9ec20afc09fc0d285c4791546c5975542b7737945d7b1f44fc9f3ae605553d521e85abff3bf973e897c9ab
|
7
|
+
data.tar.gz: bb8a2f4bd93f401836b29da1a10a4440aff0c207fbc7b1c48d14d87d44204967c5f0d7dced3282baade539781f43267bafe9c15f994354eb19a2e76123827ef2
|
data/ChangeLog
CHANGED
@@ -1,6 +1,12 @@
|
|
1
|
+
=== 2017-04-24
|
2
|
+
* Removed all direct delegateds. Now relies on method_missing to call Watir methods.
|
3
|
+
* You may have to change RSpec matchers to use method instead of predicate.
|
1
4
|
=== Version 1.2.2/ 2017/02-14
|
2
5
|
* Enhancements
|
3
6
|
* Added wait method to page class(wait document readystate as complete)
|
7
|
+
* When_visible and when_not_visible now wait for element to be present before checking
|
8
|
+
* Populate_page_with can populate select_list using values
|
9
|
+
* Remove all custom locator mappings
|
4
10
|
=== Version 1.2.1/ 2017-01-26
|
5
11
|
* Enhancements
|
6
12
|
* Added array methods to section collections
|
@@ -10,13 +16,6 @@
|
|
10
16
|
* Added numerous missing element types
|
11
17
|
* Added two new methods that check without throwing exception
|
12
18
|
* Update to use watir 6 instead of watir-webdriver
|
13
|
-
* Added focused? method on element
|
14
|
-
* Added the following methods to Element
|
15
|
-
- outer_html
|
16
|
-
- inner_html
|
17
|
-
- stale?
|
18
|
-
* Added the selected? method to Option
|
19
|
-
* Added the append method to TextArea
|
20
19
|
=== 2017-01-25
|
21
20
|
* Enhancements
|
22
21
|
* Added list_items method to UnorderedList to get an array of children.
|
data/Gemfile
CHANGED
@@ -4,10 +4,5 @@ source "http://rubygems.org"
|
|
4
4
|
gem 'rake'
|
5
5
|
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
|
6
6
|
gem 'listen', '3.0.8'
|
7
|
-
gem 'net-http-persistent'
|
8
|
-
|
9
|
-
if ENV['WATIR_BRANCH']
|
10
|
-
gem 'watir', :git => 'https://github.com/watir/watir.git', :branch => ENV['WATIR_BRANCH']
|
11
|
-
end
|
12
7
|
|
13
8
|
gemspec
|
data/druid.gemspec
CHANGED
@@ -20,9 +20,10 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.require_paths = ["lib"]
|
21
21
|
s.add_dependency "watir", "~> 6.0"
|
22
22
|
s.add_dependency "page_navigation", ">= 0.10"
|
23
|
-
s.add_dependency "net-http-persistent", "~> 2.9.4"
|
24
23
|
|
25
24
|
s.add_development_dependency "rspec", ">= 3.0.0"
|
26
25
|
s.add_development_dependency "cucumber", ">= 2.0.0"
|
27
26
|
s.add_development_dependency "rack", ">= 1.0"
|
27
|
+
s.add_development_dependency "net-http-persistent", "~> 3.0"
|
28
|
+
|
28
29
|
end
|
data/features/area.feature
CHANGED
data/features/audio.feature
CHANGED
@@ -16,7 +16,6 @@ Feature: Support for the audio element
|
|
16
16
|
| search_by |
|
17
17
|
| id |
|
18
18
|
| class |
|
19
|
-
| name |
|
20
19
|
| xpath |
|
21
20
|
| index |
|
22
21
|
| css |
|
@@ -28,7 +27,6 @@ Feature: Support for the audio element
|
|
28
27
|
Examples:
|
29
28
|
| param1 | param2 |
|
30
29
|
| class | index |
|
31
|
-
| name | index |
|
32
30
|
|
33
31
|
Scenario: Should know if it is autoplay
|
34
32
|
When I retrieve the audio element from the page
|
data/features/bold.feature
CHANGED
data/features/canvas.feature
CHANGED
@@ -16,7 +16,6 @@ Feature: Support for the canvas element
|
|
16
16
|
| search_by |
|
17
17
|
| id |
|
18
18
|
| class |
|
19
|
-
| name |
|
20
19
|
| xpath |
|
21
20
|
| index |
|
22
21
|
| css |
|
@@ -33,4 +32,3 @@ Feature: Support for the canvas element
|
|
33
32
|
Examples:
|
34
33
|
| param1 | param2 |
|
35
34
|
| class | index |
|
36
|
-
| name | index |
|
data/features/div.feature
CHANGED
@@ -20,7 +20,6 @@ Feature: Div
|
|
20
20
|
| class |
|
21
21
|
| xpath |
|
22
22
|
| index |
|
23
|
-
| name |
|
24
23
|
| text |
|
25
24
|
| title |
|
26
25
|
| css |
|
@@ -38,7 +37,6 @@ Feature: Div
|
|
38
37
|
Examples:
|
39
38
|
| param1 | param2 |
|
40
39
|
| class | index |
|
41
|
-
| name | index |
|
42
40
|
|
43
41
|
@locator
|
44
42
|
Scenario: Finding a div dynamically
|
data/features/heading.feature
CHANGED
@@ -26,7 +26,6 @@ Feature: Headings
|
|
26
26
|
| search_by |
|
27
27
|
| id |
|
28
28
|
| class |
|
29
|
-
| name |
|
30
29
|
| xpath |
|
31
30
|
| index |
|
32
31
|
| css |
|
@@ -39,7 +38,6 @@ Feature: Headings
|
|
39
38
|
Examples:
|
40
39
|
| param1 | param2 |
|
41
40
|
| class | index |
|
42
|
-
| name | index |
|
43
41
|
|
44
42
|
@locator
|
45
43
|
Scenario: Finding a h1 dynamically
|
@@ -54,7 +52,6 @@ Feature: Headings
|
|
54
52
|
| search_by |
|
55
53
|
| id |
|
56
54
|
| class |
|
57
|
-
| name |
|
58
55
|
| xpath |
|
59
56
|
| index |
|
60
57
|
| css |
|
@@ -67,7 +64,6 @@ Feature: Headings
|
|
67
64
|
Examples:
|
68
65
|
| param1 | param2 |
|
69
66
|
| class | index |
|
70
|
-
| name | index |
|
71
67
|
|
72
68
|
@locator
|
73
69
|
Scenario: Finding a h2 dynamically
|
@@ -82,7 +78,6 @@ Feature: Headings
|
|
82
78
|
| search_by |
|
83
79
|
| id |
|
84
80
|
| class |
|
85
|
-
| name |
|
86
81
|
| xpath |
|
87
82
|
| index |
|
88
83
|
| css |
|
@@ -95,7 +90,6 @@ Feature: Headings
|
|
95
90
|
Examples:
|
96
91
|
| param1 | param2 |
|
97
92
|
| class | index |
|
98
|
-
| name | index |
|
99
93
|
|
100
94
|
@locator
|
101
95
|
Scenario: Finding a h3 dynamically
|
@@ -111,7 +105,6 @@ Feature: Headings
|
|
111
105
|
| search_by |
|
112
106
|
| id |
|
113
107
|
| class |
|
114
|
-
| name |
|
115
108
|
| xpath |
|
116
109
|
| index |
|
117
110
|
| css |
|
@@ -124,7 +117,6 @@ Feature: Headings
|
|
124
117
|
Examples:
|
125
118
|
| param1 | param2 |
|
126
119
|
| class | index |
|
127
|
-
| name | index |
|
128
120
|
|
129
121
|
|
130
122
|
@locator
|
@@ -140,7 +132,6 @@ Feature: Headings
|
|
140
132
|
| search_by |
|
141
133
|
| id |
|
142
134
|
| class |
|
143
|
-
| name |
|
144
135
|
| xpath |
|
145
136
|
| index |
|
146
137
|
| css |
|
@@ -159,7 +150,6 @@ Feature: Headings
|
|
159
150
|
| search_by |
|
160
151
|
| id |
|
161
152
|
| class |
|
162
|
-
| name |
|
163
153
|
| xpath |
|
164
154
|
| index |
|
165
155
|
| css |
|
data/features/italic.feature
CHANGED
data/features/label.feature
CHANGED
@@ -26,7 +26,6 @@ Feature: Handling labels with page object
|
|
26
26
|
| class |
|
27
27
|
| xpath |
|
28
28
|
| index |
|
29
|
-
| name |
|
30
29
|
| text |
|
31
30
|
| css |
|
32
31
|
|
@@ -37,7 +36,6 @@ Feature: Handling labels with page object
|
|
37
36
|
Examples:
|
38
37
|
| param1 | param2 |
|
39
38
|
| class | index |
|
40
|
-
| name | index |
|
41
39
|
|
42
40
|
Scenario: Finding a label dynamically
|
43
41
|
When I get the text from a label while the script is executing
|
data/features/link.feature
CHANGED
data/features/list_item.feature
CHANGED
@@ -18,7 +18,6 @@ Feature: List item
|
|
18
18
|
| class |
|
19
19
|
| xpath |
|
20
20
|
| index |
|
21
|
-
| name |
|
22
21
|
| text |
|
23
22
|
| css |
|
24
23
|
|
@@ -30,7 +29,6 @@ Feature: List item
|
|
30
29
|
Examples:
|
31
30
|
| param1 | param2 |
|
32
31
|
| class | index |
|
33
|
-
| name | index |
|
34
32
|
|
35
33
|
@locator
|
36
34
|
Scenario: Finding a list item dynamically
|
@@ -21,7 +21,6 @@ Feature: Ordered list
|
|
21
21
|
| class |
|
22
22
|
| xpath |
|
23
23
|
| index |
|
24
|
-
| name |
|
25
24
|
| css |
|
26
25
|
|
27
26
|
@multi
|
@@ -33,7 +32,6 @@ Feature: Ordered list
|
|
33
32
|
Examples:
|
34
33
|
| param1 | param2 |
|
35
34
|
| class | index |
|
36
|
-
| name | index |
|
37
35
|
|
38
36
|
@locator
|
39
37
|
Scenario: Finding a ordered list dynamically
|
data/features/paragraph.feature
CHANGED
@@ -17,7 +17,6 @@ Feature: Paragraph
|
|
17
17
|
| class |
|
18
18
|
| xpath |
|
19
19
|
| index |
|
20
|
-
| name |
|
21
20
|
| css |
|
22
21
|
|
23
22
|
Scenario Outline: Locating paragraphs using multiple parameters
|
@@ -27,7 +26,6 @@ Feature: Paragraph
|
|
27
26
|
Examples:
|
28
27
|
| param1 | param2 |
|
29
28
|
| class | index |
|
30
|
-
| name | index |
|
31
29
|
|
32
30
|
Scenario: Finding a paragraph dynamically
|
33
31
|
When I get the text from a paragraph while the script is executing
|
data/features/span.feature
CHANGED
@@ -18,7 +18,6 @@ Feature: Span
|
|
18
18
|
| class |
|
19
19
|
| xpath |
|
20
20
|
| index |
|
21
|
-
| name |
|
22
21
|
| text |
|
23
22
|
| title |
|
24
23
|
| css |
|
@@ -36,7 +35,6 @@ Feature: Span
|
|
36
35
|
Examples:
|
37
36
|
| param1 | param2 |
|
38
37
|
| class | index |
|
39
|
-
| name | index |
|
40
38
|
|
41
39
|
@locator
|
42
40
|
Scenario: Finding a span dynamically
|
@@ -29,7 +29,7 @@ Then(/^I should know its' text includes "(.*?)"$/) do |text|
|
|
29
29
|
end
|
30
30
|
|
31
31
|
Then(/^I should know it is not visible$/) do
|
32
|
-
expect(@element).
|
32
|
+
expect(@element.visible?).to be false
|
33
33
|
end
|
34
34
|
|
35
35
|
When(/^I clear the text field$/) do
|
@@ -140,7 +140,7 @@ When(/^I scroll the heading element into view$/) do
|
|
140
140
|
end
|
141
141
|
|
142
142
|
Then(/^the heading element should be visible$/) do
|
143
|
-
expect(@element).to
|
143
|
+
expect(@element.visible?).to be true
|
144
144
|
end
|
145
145
|
|
146
146
|
When(/^I retrieve a div using data\-entity$/) do
|
@@ -63,7 +63,7 @@ When(/^I access an element that is outside of the section$/) do
|
|
63
63
|
end
|
64
64
|
|
65
65
|
Then(/^I should see that is doesn't exist in the section$/) do
|
66
|
-
expect(@element).
|
66
|
+
expect(@element.exist?).to be false
|
67
67
|
end
|
68
68
|
|
69
69
|
When(/^I search for a link located in a section$/) do
|
data/features/table.feature
CHANGED
@@ -61,7 +61,6 @@ Feature: Table
|
|
61
61
|
| class |
|
62
62
|
| xpath |
|
63
63
|
| index |
|
64
|
-
| name |
|
65
64
|
| css |
|
66
65
|
|
67
66
|
Scenario: Retrieve the data from a table
|
@@ -80,7 +79,6 @@ Feature: Table
|
|
80
79
|
Examples:
|
81
80
|
| param1 | param2 |
|
82
81
|
| class | index |
|
83
|
-
| name | index |
|
84
82
|
|
85
83
|
@locator
|
86
84
|
Scenario: Finding a table dynamically
|
data/features/table_cell.feature
CHANGED
@@ -18,7 +18,6 @@ Feature: Table Cell
|
|
18
18
|
| class |
|
19
19
|
| xpath |
|
20
20
|
| index |
|
21
|
-
| name |
|
22
21
|
| text |
|
23
22
|
| css |
|
24
23
|
|
@@ -35,7 +34,6 @@ Feature: Table Cell
|
|
35
34
|
Examples:
|
36
35
|
| param1 | param2 |
|
37
36
|
| class | index |
|
38
|
-
| name | index |
|
39
37
|
|
40
38
|
@locator
|
41
39
|
Scenario: Finding a table cell dynamically
|
@@ -21,7 +21,6 @@ Feature: Unordered list
|
|
21
21
|
| class |
|
22
22
|
| xpath |
|
23
23
|
| index |
|
24
|
-
| name |
|
25
24
|
| css |
|
26
25
|
|
27
26
|
@multi
|
@@ -33,8 +32,6 @@ Feature: Unordered list
|
|
33
32
|
Examples:
|
34
33
|
| param1 | param2 |
|
35
34
|
| class | index |
|
36
|
-
| name | index |
|
37
|
-
| class | name |
|
38
35
|
|
39
36
|
@locator
|
40
37
|
Scenario: Finding a unordered list dynamically
|
data/features/video.feature
CHANGED
@@ -16,7 +16,6 @@ Feature: Support for video element
|
|
16
16
|
| search_by |
|
17
17
|
| id |
|
18
18
|
| class |
|
19
|
-
| name |
|
20
19
|
| xpath |
|
21
20
|
| index |
|
22
21
|
| css |
|
@@ -28,16 +27,6 @@ Feature: Support for video element
|
|
28
27
|
Examples:
|
29
28
|
| param1 | param2 |
|
30
29
|
| class | index |
|
31
|
-
| name | index |
|
32
|
-
|
33
|
-
Scenario Outline: Locating videos using multiple parameters
|
34
|
-
When I search for the video element by "<param1>" and "<param2>"
|
35
|
-
Then I should know it is visible
|
36
|
-
|
37
|
-
Examples:
|
38
|
-
| param1 | param2 |
|
39
|
-
| class | index |
|
40
|
-
| name | index |
|
41
30
|
|
42
31
|
Scenario: Should know if it is autoplay
|
43
32
|
When I retrieve the video element
|
data/lib/druid.rb
CHANGED
@@ -44,11 +44,7 @@ module Druid
|
|
44
44
|
# extend Forwardable
|
45
45
|
|
46
46
|
def method_missing(method, *args, &block)
|
47
|
-
|
48
|
-
@root_element.send(method, *args, &block)
|
49
|
-
else
|
50
|
-
super
|
51
|
-
end
|
47
|
+
@root_element.send(method, *args, &block)
|
52
48
|
end
|
53
49
|
|
54
50
|
def respond_to_missing?(method, include_all = false)
|
data/lib/druid/accessors.rb
CHANGED
@@ -212,16 +212,6 @@ module Druid
|
|
212
212
|
#
|
213
213
|
# @param [Symbol] the name used for the generated methods
|
214
214
|
# @param [Hash] identifier how we find a text_field. You can use a multiple parameters
|
215
|
-
# by combining of any of the following except xpath. The valid values are:
|
216
|
-
# * :class
|
217
|
-
# * :id
|
218
|
-
# * :index
|
219
|
-
# * :name
|
220
|
-
# * :xpath
|
221
|
-
# * :text
|
222
|
-
# * :title
|
223
|
-
# * :label
|
224
|
-
# * :css
|
225
215
|
# @param optional block to be invoked when element method is called
|
226
216
|
#
|
227
217
|
def text_field(name, identifier={:index => 0}, &block)
|
@@ -249,15 +239,6 @@ module Druid
|
|
249
239
|
#
|
250
240
|
# @param [Symbol] the name used for the generated methods
|
251
241
|
# @param [Hash] identifier how we find a checkbox. You can use a multiple parameters
|
252
|
-
# by combining of any of the following except xpath. The valid values are:
|
253
|
-
# * :class
|
254
|
-
# * :id
|
255
|
-
# * :index
|
256
|
-
# * :name
|
257
|
-
# * :xpath
|
258
|
-
# * :value
|
259
|
-
# * :label
|
260
|
-
# * :css
|
261
242
|
# @param optional block to be invoked when element method is called
|
262
243
|
#
|
263
244
|
def checkbox(name, identifier={:index => 0}, &block)
|
@@ -289,14 +270,6 @@ module Druid
|
|
289
270
|
#
|
290
271
|
# @param [Symbol] the name used for the generated methods
|
291
272
|
# @param [Hash] identifier how we find a select_list. You can use a multiple parameters
|
292
|
-
# by combining of any of the following except xpath. The valid values are:
|
293
|
-
# :class
|
294
|
-
# :id
|
295
|
-
# :index
|
296
|
-
# :name
|
297
|
-
# :xpath
|
298
|
-
# :label
|
299
|
-
# :css
|
300
273
|
# @param optional block to be invoked when element method is called
|
301
274
|
#
|
302
275
|
def select_list(name, identifier={:index => 0}, &block)
|
@@ -329,15 +302,6 @@ module Druid
|
|
329
302
|
#
|
330
303
|
# @param [Symbol] the name used for the generated methods
|
331
304
|
# @param [Hash] identifier how we find a radio_button. You can use a multiple parameters
|
332
|
-
# by combining of any of the following except xpath. The valid values are:
|
333
|
-
# * :class
|
334
|
-
# * :id
|
335
|
-
# * :index
|
336
|
-
# * :name
|
337
|
-
# * :xpath
|
338
|
-
# * :value
|
339
|
-
# * :label
|
340
|
-
# * :css
|
341
305
|
# @param optional block to be invoked when element method is called
|
342
306
|
#
|
343
307
|
def radio_button(name, identifier={:index => 0}, &block)
|
@@ -385,16 +349,6 @@ module Druid
|
|
385
349
|
#
|
386
350
|
# @param [Symbol] the name used for the generated methods
|
387
351
|
# @param [Hash] identifier how we find a button. You can use a multiple parameters
|
388
|
-
# by combining of any of the following except xpath. The valid values are:
|
389
|
-
# :class
|
390
|
-
# :id
|
391
|
-
# :index
|
392
|
-
# :name
|
393
|
-
# :text
|
394
|
-
# :xpath
|
395
|
-
# :src
|
396
|
-
# :alt
|
397
|
-
# :css
|
398
352
|
# @param optional block to be invoked when element method is called
|
399
353
|
#
|
400
354
|
def button(name, identifier={:index => 0}, &block)
|
@@ -415,16 +369,6 @@ module Druid
|
|
415
369
|
#
|
416
370
|
# @param [Symbol] the name used for the generated methods
|
417
371
|
# @param [Hash] identifier how we find a div. You can use a multiple parameters
|
418
|
-
# by combining of any of the following except xpath. The valid values are:
|
419
|
-
# * :class
|
420
|
-
# * :id
|
421
|
-
# * :index
|
422
|
-
# * :xpath
|
423
|
-
# * :name
|
424
|
-
# * :text
|
425
|
-
# * :value
|
426
|
-
# * :title
|
427
|
-
# * :css
|
428
372
|
# @param optional block to be invoked when element method is called
|
429
373
|
#
|
430
374
|
def div(name, identifier={:index => 0}, &block)
|
@@ -446,13 +390,6 @@ module Druid
|
|
446
390
|
#
|
447
391
|
# @param the name used for the generated methods
|
448
392
|
# @param identifier how we find a table. You can use a multiple parameters
|
449
|
-
# by combining of any of the following except xpath. The valid values are:
|
450
|
-
# * :class
|
451
|
-
# * :id
|
452
|
-
# * :index
|
453
|
-
# * :xpath
|
454
|
-
# * :name
|
455
|
-
# * :css
|
456
393
|
# @param optional block to be invoked when element method is called
|
457
394
|
#
|
458
395
|
def table(name, identifier={:index => 0}, &block)
|
@@ -474,14 +411,6 @@ module Druid
|
|
474
411
|
#
|
475
412
|
# @param [Symbol] the name used for the generated methods
|
476
413
|
# @param [Hash] identifier how we find a cell. You can use a multiple parameters
|
477
|
-
# by combining of any of the following except xpath. The valid values are:
|
478
|
-
# * :class
|
479
|
-
# * :id
|
480
|
-
# * :index
|
481
|
-
# * :xpath
|
482
|
-
# * :name
|
483
|
-
# * :text
|
484
|
-
# * :css
|
485
414
|
# @param optional block to be invoked when element method is called
|
486
415
|
#
|
487
416
|
def cell(name, identifier={:index => 0}, &block)
|
@@ -504,13 +433,6 @@ module Druid
|
|
504
433
|
#
|
505
434
|
# @param [Symbol] the name used for the generated methods
|
506
435
|
# @param [Hash] identifier how we find a cell. You can use a multiple parameters
|
507
|
-
# by combining of any of the following except xpath. The valid keys are:
|
508
|
-
# * :class
|
509
|
-
# * :css
|
510
|
-
# * :id
|
511
|
-
# * :index
|
512
|
-
# * :text
|
513
|
-
# * :xpath
|
514
436
|
# @param optional block to be invoked when element method is called
|
515
437
|
#
|
516
438
|
def row(name, identifier={:index => 0}, &block)
|
@@ -531,15 +453,6 @@ module Druid
|
|
531
453
|
#
|
532
454
|
# @param [Symbol] the name used for the generated methods
|
533
455
|
# @param [Hash] identifier how we find a span. You can use a multiple parameters
|
534
|
-
# by combining of any of the following except xpath. The valid values are:
|
535
|
-
# * :class
|
536
|
-
# * :id
|
537
|
-
# * :index
|
538
|
-
# * :xpath
|
539
|
-
# * :name
|
540
|
-
# * :text
|
541
|
-
# * :title
|
542
|
-
# * :css
|
543
456
|
# @param optional block to be invoked when element method is called
|
544
457
|
#
|
545
458
|
def span(name, identifier={:index => 0}, &block)
|
@@ -560,15 +473,6 @@ module Druid
|
|
560
473
|
#
|
561
474
|
# @param [Symbol] the name used for the generated methods
|
562
475
|
# @param [Hash] identifier how we find a image. You can use a multiple parameters
|
563
|
-
# by combining of any of the following except xpath. The valid values are:
|
564
|
-
# * :class
|
565
|
-
# * :id
|
566
|
-
# * :index
|
567
|
-
# * :name
|
568
|
-
# * :xpath
|
569
|
-
# * :alt
|
570
|
-
# * :src
|
571
|
-
# * :css
|
572
476
|
# @param optional block to be invoked when element method is called
|
573
477
|
#
|
574
478
|
def image(name, identifier={:index => 0}, &block)
|
@@ -590,14 +494,6 @@ module Druid
|
|
590
494
|
#
|
591
495
|
# @param [Symbol] the name used for the generated methods
|
592
496
|
# @param [Hash] identifier how we find a form. You can use a multiple parameters
|
593
|
-
# by combining of any of the following except xpath. The valid keys are:
|
594
|
-
# * :class
|
595
|
-
# * :id
|
596
|
-
# * :index
|
597
|
-
# * :xpath
|
598
|
-
# * :name
|
599
|
-
# * :action
|
600
|
-
# * :css
|
601
497
|
# @param optional block to be invoked when element method is called
|
602
498
|
#
|
603
499
|
def form(name, identifier={:index => 0}, &block)
|
@@ -615,15 +511,6 @@ module Druid
|
|
615
511
|
#
|
616
512
|
# @param [Symbol] the name used for the generated methods
|
617
513
|
# @param [Hash] identifier how we find a hidden field. You can use a multiple parameters
|
618
|
-
# by combining of any of the following except xpath. The valid keys are:
|
619
|
-
# * :class
|
620
|
-
# * :id
|
621
|
-
# * :index
|
622
|
-
# * :name
|
623
|
-
# * :text
|
624
|
-
# * :xpath
|
625
|
-
# * :value
|
626
|
-
# * :css
|
627
514
|
# @param optional block to be invoked when element method is called
|
628
515
|
#
|
629
516
|
def hidden_field(name, identifier={:index => 0}, &block)
|
@@ -646,14 +533,6 @@ module Druid
|
|
646
533
|
#
|
647
534
|
# @param [Symbol] the name used for the generated methods
|
648
535
|
# @param [Hash] identifier how we find a list item. You can use a multiple parameters
|
649
|
-
# by combining of any of the following except xpath. The valid keys are:
|
650
|
-
# * :class
|
651
|
-
# * :id
|
652
|
-
# * :index
|
653
|
-
# * :xpath
|
654
|
-
# * :name
|
655
|
-
# * :text
|
656
|
-
# * :css
|
657
536
|
# @param optional block to be invoked when element method is called
|
658
537
|
#
|
659
538
|
def list_item(name, identifier={:index => 0}, &block)
|
@@ -676,13 +555,6 @@ module Druid
|
|
676
555
|
#
|
677
556
|
# @param [Symbol] the name used for the generated methods
|
678
557
|
# @param [Hash] identifier how we find an ordered list. You can use a multiple parameters
|
679
|
-
# by combining of any of the following except xpath. The valid keys are:
|
680
|
-
# * :class
|
681
|
-
# * :id
|
682
|
-
# * :index
|
683
|
-
# * :xpath
|
684
|
-
# * :name
|
685
|
-
# * :css
|
686
558
|
# @param optional block to be invoked when element method is called
|
687
559
|
#
|
688
560
|
def ordered_list(name, identifier={:index => 0}, &block)
|
@@ -706,14 +578,6 @@ module Druid
|
|
706
578
|
#
|
707
579
|
# @param [Symbol] the name used for the generated methods
|
708
580
|
# @param [Hash] identifier how we find a text area. You can use a multiple parameters
|
709
|
-
# by combining of any of the following except xpath. The valid keys are:
|
710
|
-
# * :class
|
711
|
-
# * :id
|
712
|
-
# * :index
|
713
|
-
# * :name
|
714
|
-
# * :xpath
|
715
|
-
# * :label
|
716
|
-
# * :css
|
717
581
|
# @param optional block to be invoked when element method is called
|
718
582
|
#
|
719
583
|
def text_area(name, identifier={:index => 0}, &block)
|
@@ -739,13 +603,6 @@ module Druid
|
|
739
603
|
#
|
740
604
|
# @param [Symbol] the name used for the generated methods
|
741
605
|
# @param [Hash] identifier how we find an unordered list. You can use a multiple parameters
|
742
|
-
# by combining of any of the following except xpath. The valid keys are:
|
743
|
-
# * :class
|
744
|
-
# * :id
|
745
|
-
# * :index
|
746
|
-
# * :xpath
|
747
|
-
# * :name
|
748
|
-
# * :css
|
749
606
|
# @param optional block to be invoked when element method is called
|
750
607
|
def unordered_list(name, identifier={:index => 0}, &block)
|
751
608
|
standard_methods(name, identifier, 'unordered_list_for', &block)
|
@@ -766,13 +623,6 @@ module Druid
|
|
766
623
|
#
|
767
624
|
# @param [Symbol] the name used for the generated methods
|
768
625
|
# @param [Hash] identifier how we find a H1. You can use a multiple paramaters
|
769
|
-
# by combining of any of the following except xpath. The valid keys are:
|
770
|
-
# * :class
|
771
|
-
# * :id
|
772
|
-
# * :index
|
773
|
-
# * :name
|
774
|
-
# * :xpath
|
775
|
-
# * :css
|
776
626
|
# @param optional block to be invoked when element method is called
|
777
627
|
#
|
778
628
|
def h1(name, identifier={:index => 0}, &block)
|
@@ -793,13 +643,6 @@ module Druid
|
|
793
643
|
#
|
794
644
|
# @param [Symbol] the name used for the generated methods
|
795
645
|
# @param [Hash] identifier how we find a H2. You can use a multiple paramaters
|
796
|
-
# by combining of any of the following except xpath. The valid keys are:
|
797
|
-
# * :class
|
798
|
-
# * :id
|
799
|
-
# * :index
|
800
|
-
# * :name
|
801
|
-
# * :xpath
|
802
|
-
# * :css
|
803
646
|
# @param optional block to be invoked when element method is called
|
804
647
|
#
|
805
648
|
def h2(name, identifier={:index => 0}, &block)
|
@@ -820,13 +663,6 @@ module Druid
|
|
820
663
|
#
|
821
664
|
# @param [Symbol] the name used for the generated methods
|
822
665
|
# @param [Hash] identifier how we find a H3. You can use a multiple paramaters
|
823
|
-
# by combining of any of the following except xpath. The valid keys are:
|
824
|
-
# * :class
|
825
|
-
# * :id
|
826
|
-
# * :index
|
827
|
-
# * :name
|
828
|
-
# * :xpath
|
829
|
-
# * :css
|
830
666
|
# @param optional block to be invoked when element method is called
|
831
667
|
#
|
832
668
|
def h3(name, identifier={:index => 0}, &block)
|
@@ -847,13 +683,6 @@ module Druid
|
|
847
683
|
#
|
848
684
|
# @param [Symbol] the name used for the generated methods
|
849
685
|
# @param [Hash] identifier how we find a H4. You can use a multiple paramaters
|
850
|
-
# by combining of any of the following except xpath. The valid keys are:
|
851
|
-
# * :class
|
852
|
-
# * :id
|
853
|
-
# * :index
|
854
|
-
# * :name
|
855
|
-
# * :xpath
|
856
|
-
# * :css
|
857
686
|
# @param optional block to be invoked when element method is called
|
858
687
|
#
|
859
688
|
def h4(name, identifier={:index => 0}, &block)
|
@@ -874,13 +703,6 @@ module Druid
|
|
874
703
|
#
|
875
704
|
# @param [Symbol] the name used for the generated methods
|
876
705
|
# @param [Hash] identifier how we find a H5. You can use a multiple paramaters
|
877
|
-
# by combining of any of the following except xpath. The valid keys are:
|
878
|
-
# * :class
|
879
|
-
# * :id
|
880
|
-
# * :index
|
881
|
-
# * :name
|
882
|
-
# * :xpath
|
883
|
-
# * :css
|
884
706
|
# @param optional block to be invoked when element method is called
|
885
707
|
#
|
886
708
|
def h5(name, identifier={:index => 0}, &block)
|
@@ -901,13 +723,6 @@ module Druid
|
|
901
723
|
#
|
902
724
|
# @param [Symbol] the name used for the generated methods
|
903
725
|
# @param [Hash] identifier how we find a H6. You can use a multiple paramaters
|
904
|
-
# by combining of any of the following except xpath. The valid keys are:
|
905
|
-
# * :class
|
906
|
-
# * :id
|
907
|
-
# * :index
|
908
|
-
# * :name
|
909
|
-
# * :xpath
|
910
|
-
# * :css
|
911
726
|
# @param optional block to be invoked when element method is called
|
912
727
|
#
|
913
728
|
def h6(name, identifier={:index => 0}, &block)
|
@@ -928,13 +743,6 @@ module Druid
|
|
928
743
|
#
|
929
744
|
# @param [Symbol] the name used for the generated methods
|
930
745
|
# @param [Hash] identifier how we find a paragraph. You can use a multiple paramaters
|
931
|
-
# by combining of any of the following except xpath. The valid keys are:
|
932
|
-
# * :class
|
933
|
-
# * :id
|
934
|
-
# * :index
|
935
|
-
# * :name
|
936
|
-
# * :xpath
|
937
|
-
# * :css
|
938
746
|
# @param optional block to be invoked when element method is called
|
939
747
|
#
|
940
748
|
def paragraph(name, identifier={:index => 0}, &block)
|
@@ -956,15 +764,6 @@ module Druid
|
|
956
764
|
#
|
957
765
|
# @param [Symbol] the name used for the generated methods
|
958
766
|
# @param [Hash] identifier how we find a file_field. You can use a multiple paramaters
|
959
|
-
# by combining of any of the following except xpath. The valid keys are:
|
960
|
-
# * :class
|
961
|
-
# * :id
|
962
|
-
# * :index
|
963
|
-
# * :name
|
964
|
-
# * :title
|
965
|
-
# * :xpath
|
966
|
-
# * :label
|
967
|
-
# * :css
|
968
767
|
# @param optional block to be invoked when element method is called
|
969
768
|
#
|
970
769
|
def file_field(name, identifier={:index => 0}, &block)
|
@@ -985,14 +784,6 @@ module Druid
|
|
985
784
|
#
|
986
785
|
# @param [Symbol] the name used for the generated methods
|
987
786
|
# @param [Hash] identifier how we find a label. You can use a multiple parameters
|
988
|
-
# by combining of any of the following except xpath. The valid keys are:
|
989
|
-
# * :class
|
990
|
-
# * :id
|
991
|
-
# * :index
|
992
|
-
# * :name
|
993
|
-
# * :text
|
994
|
-
# * :xpath
|
995
|
-
# * :css
|
996
787
|
# @param optional block to be invoked when element method is called
|
997
788
|
#
|
998
789
|
def label(name, identifier={:index => 0}, &block)
|
@@ -1013,14 +804,6 @@ module Druid
|
|
1013
804
|
#
|
1014
805
|
# @param [Symbol] the name used for the generated methods
|
1015
806
|
# @param [Hash] identifier how we find an area. You can use a multiple parameters
|
1016
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1017
|
-
# * :class
|
1018
|
-
# * :id
|
1019
|
-
# * :index
|
1020
|
-
# * :name
|
1021
|
-
# * :xpath
|
1022
|
-
# * :text
|
1023
|
-
# * :css
|
1024
807
|
# @param optional block to be invoked when element method is called
|
1025
808
|
#
|
1026
809
|
def area(name, identifier={:index => 0}, &block)
|
@@ -1041,13 +824,6 @@ module Druid
|
|
1041
824
|
#
|
1042
825
|
# @param [Symbol] the name used for the generated methods
|
1043
826
|
# @param [Hash] identifier how we find a canvas. You can use a multiple parameters
|
1044
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1045
|
-
# * :class
|
1046
|
-
# * :id
|
1047
|
-
# * :index
|
1048
|
-
# * :name
|
1049
|
-
# * :xpath
|
1050
|
-
# * :css
|
1051
827
|
# @param optional block to be invoked when element method is called
|
1052
828
|
#
|
1053
829
|
def canvas(name, identifier={:index => 0}, &block)
|
@@ -1064,13 +840,6 @@ module Druid
|
|
1064
840
|
#
|
1065
841
|
# @param [Symbol] the name used for the generated methods
|
1066
842
|
# @param [Hash] identifier how we find an audio element. You can use a multiple parameters
|
1067
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1068
|
-
# * :class
|
1069
|
-
# * :id
|
1070
|
-
# * :index
|
1071
|
-
# * :name
|
1072
|
-
# * :xpath
|
1073
|
-
# * :css
|
1074
843
|
# @param optional block to be invoked when element method is called
|
1075
844
|
#
|
1076
845
|
def audio(name, identifier={:index => 0}, &block)
|
@@ -1087,13 +856,6 @@ module Druid
|
|
1087
856
|
#
|
1088
857
|
# @param [Symbol] the name used for the generated methods
|
1089
858
|
# @param [Hash] identifier how we find a video element. You can use a multiple parameters
|
1090
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1091
|
-
# * :class
|
1092
|
-
# * :id
|
1093
|
-
# * :index
|
1094
|
-
# * :name
|
1095
|
-
# * :xpath
|
1096
|
-
# * css
|
1097
859
|
# @param optional block to be invoked when element method is called
|
1098
860
|
#
|
1099
861
|
def video(name, identifier={:index => 0}, &block)
|
@@ -1110,13 +872,6 @@ module Druid
|
|
1110
872
|
#
|
1111
873
|
# @param [Symbol] the name used for the generated methods
|
1112
874
|
# @param [Hash] identifier how we find a b, You can use a multiple parameters
|
1113
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1114
|
-
# * :class
|
1115
|
-
# * :css
|
1116
|
-
# * :id
|
1117
|
-
# * :index
|
1118
|
-
# * :name
|
1119
|
-
# * :xpath
|
1120
875
|
# @param optional block to be invoked when element method is called
|
1121
876
|
#
|
1122
877
|
def b(name, identifier={:index => 0}, &block)
|
@@ -1137,13 +892,6 @@ module Druid
|
|
1137
892
|
#
|
1138
893
|
# @param [Symbol] the name used for the generated methods
|
1139
894
|
# @param [Hash] identifier how we find a i, You can use a multiple parameters
|
1140
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1141
|
-
# * :class
|
1142
|
-
# * :css
|
1143
|
-
# * :id
|
1144
|
-
# * :index
|
1145
|
-
# * :name
|
1146
|
-
# * :xpath
|
1147
895
|
# @param optional block to be invoked when element method is called
|
1148
896
|
#
|
1149
897
|
def i(name, identifier={:index => 0}, &block)
|
@@ -1165,13 +913,6 @@ module Druid
|
|
1165
913
|
#
|
1166
914
|
# @param [Symbol] the name used for the generated methods
|
1167
915
|
# @param [Hash] identifier how we find a svg. You can use a multiple parameters
|
1168
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1169
|
-
# * :class
|
1170
|
-
# * :css
|
1171
|
-
# * :id
|
1172
|
-
# * :index
|
1173
|
-
# * :name
|
1174
|
-
# * :xpath
|
1175
916
|
# @param optional block to be invoked when element method is called
|
1176
917
|
#
|
1177
918
|
def svg(name, identifier={:index => 0}, &block)
|
@@ -1188,13 +929,6 @@ module Druid
|
|
1188
929
|
#
|
1189
930
|
# @param [Symbol] the name used for the generated methods
|
1190
931
|
# @param [Hash] identifier how we find an element. You can use a multiple parameters
|
1191
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1192
|
-
# * :class
|
1193
|
-
# * :id
|
1194
|
-
# * :css
|
1195
|
-
# * :index
|
1196
|
-
# * :name
|
1197
|
-
# * :xpath
|
1198
932
|
# @param optional block to be invoked when element method is called
|
1199
933
|
#
|
1200
934
|
def element(name, tag=:element, identifier={:index => 0}, &block)
|
@@ -1229,13 +963,6 @@ module Druid
|
|
1229
963
|
# @param [Symbol] the name used for the generated methods
|
1230
964
|
# @param [Symbol] the name of the tag for the element
|
1231
965
|
# @param [Hash] identifier how we find an element. You can use a multiple parameters
|
1232
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1233
|
-
# * :class
|
1234
|
-
# * :id
|
1235
|
-
# * :index
|
1236
|
-
# * :css
|
1237
|
-
# * :name
|
1238
|
-
# * :xpath
|
1239
966
|
# @param optional block to be invoked when element method is called
|
1240
967
|
#
|
1241
968
|
def elements(name, tag=:element, identifier={:index => 0}, &block)
|
@@ -1274,14 +1001,7 @@ module Druid
|
|
1274
1001
|
# @param [Symbol] the name used for the generated methods
|
1275
1002
|
# @param [Class] the class to instantiate for the element
|
1276
1003
|
# @param [Hash] identifier how we find an element. You can use multiple parameters
|
1277
|
-
|
1278
|
-
# * :class
|
1279
|
-
# * :css
|
1280
|
-
# * :id
|
1281
|
-
# * :index
|
1282
|
-
# * :name
|
1283
|
-
# * :xpath
|
1284
|
-
#
|
1004
|
+
|
1285
1005
|
def page_section(name, section_class, identifier)
|
1286
1006
|
define_method(name) do
|
1287
1007
|
page_for(identifier, section_class)
|
@@ -1298,14 +1018,7 @@ module Druid
|
|
1298
1018
|
# @param [Symbol] the name used for the generated method
|
1299
1019
|
# @param [Class] the class to instantiate for each element
|
1300
1020
|
# @param [Hash] identifier how we find an element. You can use a multiple parameters
|
1301
|
-
|
1302
|
-
# * :class
|
1303
|
-
# * :css
|
1304
|
-
# * :id
|
1305
|
-
# * :index
|
1306
|
-
# * :name
|
1307
|
-
# * :xpath
|
1308
|
-
#
|
1021
|
+
|
1309
1022
|
def page_sections(name, section_class, identifier)
|
1310
1023
|
define_method(name) do
|
1311
1024
|
pages_for(identifier, section_class)
|
@@ -1323,13 +1036,6 @@ module Druid
|
|
1323
1036
|
# @param [Symbol] the name used for the generated methods
|
1324
1037
|
# @param [Symbol] the name of the tag for the element
|
1325
1038
|
# @param [Hash] identifier how we find an element. You can use a multiple paramaters
|
1326
|
-
# by combining of any of the following except xpath. The valid keys are:
|
1327
|
-
# * :class
|
1328
|
-
# * :css
|
1329
|
-
# * :id
|
1330
|
-
# * :index
|
1331
|
-
# * :name
|
1332
|
-
# * :xpath
|
1333
1039
|
# @param optional block to be invoked when element method is called
|
1334
1040
|
#
|
1335
1041
|
LocatorGenerator::BASIC_ELEMENTS.each do |tag|
|