druid-s 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 +7 -0
- data/.gitignore +7 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/.travis.yml +27 -0
- data/ChangeLog +541 -0
- data/Gemfile +8 -0
- data/README.md +78 -0
- data/Rakefile +33 -0
- data/cucumber.yml +6 -0
- data/druid.gemspec +30 -0
- data/features/area.feature +33 -0
- data/features/async.feature +16 -0
- data/features/audio.feature +61 -0
- data/features/bold.feature +20 -0
- data/features/button.feature +81 -0
- data/features/canvas.feature +34 -0
- data/features/checkbox.feature +48 -0
- data/features/div.feature +45 -0
- data/features/element.feature +281 -0
- data/features/file_field.feature +38 -0
- data/features/form.feature +37 -0
- data/features/frames.feature +76 -0
- data/features/generic_elements.feature +29 -0
- data/features/heading.feature +160 -0
- data/features/hidden_field.feature +39 -0
- data/features/html/async.html +31 -0
- data/features/html/frame_1.html +18 -0
- data/features/html/frame_2.html +16 -0
- data/features/html/frame_3.html +14 -0
- data/features/html/frames.html +12 -0
- data/features/html/hover.html +11 -0
- data/features/html/iframes.html +12 -0
- data/features/html/images/circle.png +0 -0
- data/features/html/images/img_pulpit.jpg +0 -0
- data/features/html/modal.html +17 -0
- data/features/html/modal_1.html +38 -0
- data/features/html/modal_2.html +27 -0
- data/features/html/multi_elements.html +145 -0
- data/features/html/nested_elements.html +75 -0
- data/features/html/nested_frame_1.html +1 -0
- data/features/html/nested_frame_2.html +11 -0
- data/features/html/nested_frame_3.html +14 -0
- data/features/html/nested_frames.html +10 -0
- data/features/html/planets.gif +0 -0
- data/features/html/static_elements.html +203 -0
- data/features/html/success.html +8 -0
- data/features/html/sun.gif +0 -0
- data/features/html/sun.html +7 -0
- data/features/image.feature +47 -0
- data/features/italic.feature +20 -0
- data/features/javascript.feature +28 -0
- data/features/label.feature +43 -0
- data/features/link.feature +56 -0
- data/features/list_item.feature +37 -0
- data/features/modal_dialog.feature +9 -0
- data/features/multi_elements.feature +498 -0
- data/features/nested_elements.feature +121 -0
- data/features/ordered_list.feature +46 -0
- data/features/page_level_actions.feature +116 -0
- data/features/paragraph.feature +33 -0
- data/features/populate_page_with.feature +25 -0
- data/features/radio_button.feature +51 -0
- data/features/radio_button_group.feature +28 -0
- data/features/sample-app/public/04-Death_Becomes_Fur.mp4 +0 -0
- data/features/sample-app/public/04-Death_Becomes_Fur.oga +0 -0
- data/features/sample-app/public/audio_video.html +19 -0
- data/features/sample-app/public/jquery-1.3.2.js +4376 -0
- data/features/sample-app/public/jquery.html +28 -0
- data/features/sample-app/public/movie.mp4 +0 -0
- data/features/sample-app/public/movie.ogg +0 -0
- data/features/sample-app/public/prototype-1.6.0.3.js +4320 -0
- data/features/sample-app/public/prototype.html +32 -0
- data/features/sample-app/sample_app.rb +35 -0
- data/features/section.feature +132 -0
- data/features/select_list.feature +84 -0
- data/features/span.feature +43 -0
- data/features/step_definations/area_steps.rb +23 -0
- data/features/step_definations/async_steps.rb +80 -0
- data/features/step_definations/audio_steps.rb +47 -0
- data/features/step_definations/bold_steps.rb +11 -0
- data/features/step_definations/button_steps.rb +52 -0
- data/features/step_definations/canvas_steps.rb +19 -0
- data/features/step_definations/checkbox_steps.rb +39 -0
- data/features/step_definations/div_steps.rb +28 -0
- data/features/step_definations/element_steps.rb +217 -0
- data/features/step_definations/file_field_steps.rb +31 -0
- data/features/step_definations/form_steps.rb +23 -0
- data/features/step_definations/frame_steps.rb +189 -0
- data/features/step_definations/generic_element_steps.rb +31 -0
- data/features/step_definations/heading_steps.rb +39 -0
- data/features/step_definations/hidden_field_steps.rb +27 -0
- data/features/step_definations/image_steps.rb +35 -0
- data/features/step_definations/italic_steps.rb +11 -0
- data/features/step_definations/javasript_steps.rb +52 -0
- data/features/step_definations/label_steps.rb +19 -0
- data/features/step_definations/link_steps.rb +42 -0
- data/features/step_definations/list_item_steps.rb +24 -0
- data/features/step_definations/modal_dialog_steps.rb +38 -0
- data/features/step_definations/multi_elements_steps.rb +557 -0
- data/features/step_definations/nested_elements_steps.rb +219 -0
- data/features/step_definations/ordered_list_steps.rb +49 -0
- data/features/step_definations/page_level_actions_steps.rb +172 -0
- data/features/step_definations/page_traversal_steps.rb +4 -0
- data/features/step_definations/paragraph_steps.rb +19 -0
- data/features/step_definations/populate_page_with_steps.rb +3 -0
- data/features/step_definations/radio_button_group_steps.rb +32 -0
- data/features/step_definations/radio_button_steps.rb +31 -0
- data/features/step_definations/section_steps.rb +271 -0
- data/features/step_definations/select_list_steps.rb +91 -0
- data/features/step_definations/span_steps.rb +23 -0
- data/features/step_definations/table_cell_steps.rb +27 -0
- data/features/step_definations/table_row_steps.rb +23 -0
- data/features/step_definations/table_steps.rb +109 -0
- data/features/step_definations/text_area_steps.rb +39 -0
- data/features/step_definations/text_field_steps.rb +39 -0
- data/features/step_definations/unordered_list_steps.rb +27 -0
- data/features/step_definations/video_steps.rb +27 -0
- data/features/support/ajax_test_environment.rb +26 -0
- data/features/support/audio_video_page.rb +23 -0
- data/features/support/env.rb +5 -0
- data/features/support/hooks.rb +3 -0
- data/features/support/page.rb +372 -0
- data/features/support/persistent_browser.rb +58 -0
- data/features/support/targets/firefox14_osx.rb +5 -0
- data/features/support/targets/firefox14_windows7.rb +5 -0
- data/features/support/url_helper.rb +50 -0
- data/features/table.feature +127 -0
- data/features/table_cell.feature +42 -0
- data/features/table_row.feature +30 -0
- data/features/text_area.feature +44 -0
- data/features/text_field.feature +53 -0
- data/features/unordered_list.feature +46 -0
- data/features/video.feature +66 -0
- data/lib/druid/accessors.rb +1082 -0
- data/lib/druid/assist.rb +653 -0
- data/lib/druid/element_locators.rb +21 -0
- data/lib/druid/elements/area.rb +9 -0
- data/lib/druid/elements/audio.rb +9 -0
- data/lib/druid/elements/bold.rb +8 -0
- data/lib/druid/elements/button.rb +12 -0
- data/lib/druid/elements/canvas.rb +9 -0
- data/lib/druid/elements/check_box.rb +9 -0
- data/lib/druid/elements/div.rb +9 -0
- data/lib/druid/elements/element.rb +187 -0
- data/lib/druid/elements/file_field.rb +9 -0
- data/lib/druid/elements/form.rb +9 -0
- data/lib/druid/elements/heading.rb +14 -0
- data/lib/druid/elements/hidden_field.rb +9 -0
- data/lib/druid/elements/image.rb +9 -0
- data/lib/druid/elements/italic.rb +9 -0
- data/lib/druid/elements/label.rb +8 -0
- data/lib/druid/elements/link.rb +9 -0
- data/lib/druid/elements/list_item.rb +9 -0
- data/lib/druid/elements/media.rb +11 -0
- data/lib/druid/elements/option.rb +9 -0
- data/lib/druid/elements/ordered_list.rb +29 -0
- data/lib/druid/elements/paragraph.rb +9 -0
- data/lib/druid/elements/radio_button.rb +9 -0
- data/lib/druid/elements/select_list.rb +30 -0
- data/lib/druid/elements/span.rb +9 -0
- data/lib/druid/elements/table.rb +92 -0
- data/lib/druid/elements/table_cell.rb +11 -0
- data/lib/druid/elements/table_row.rb +50 -0
- data/lib/druid/elements/text_area.rb +10 -0
- data/lib/druid/elements/text_field.rb +11 -0
- data/lib/druid/elements/unordered_list.rb +32 -0
- data/lib/druid/elements/video.rb +8 -0
- data/lib/druid/elements.rb +55 -0
- data/lib/druid/javascript/angularjs.rb +12 -0
- data/lib/druid/javascript/jquery.rb +12 -0
- data/lib/druid/javascript/prototype.rb +12 -0
- data/lib/druid/javascript/yui.rb +19 -0
- data/lib/druid/javascript_framework_facade.rb +76 -0
- data/lib/druid/locator_generator.rb +181 -0
- data/lib/druid/nested_elements.rb +56 -0
- data/lib/druid/page_factory.rb +115 -0
- data/lib/druid/page_populator.rb +104 -0
- data/lib/druid/section_collection.rb +17 -0
- data/lib/druid/version.rb +3 -0
- data/lib/druid.rb +452 -0
- data/spec/druid/accessors_spec.rb +1209 -0
- data/spec/druid/druid_spec.rb +295 -0
- data/spec/druid/element_locators_spec.rb +750 -0
- data/spec/druid/elements/bold_spec.rb +12 -0
- data/spec/druid/elements/button_spec.rb +23 -0
- data/spec/druid/elements/check_box_spec.rb +14 -0
- data/spec/druid/elements/div_spec.rb +10 -0
- data/spec/druid/elements/element_spec.rb +250 -0
- data/spec/druid/elements/file_field_spec.rb +13 -0
- data/spec/druid/elements/form_spec.rb +18 -0
- data/spec/druid/elements/heading_spec.rb +30 -0
- data/spec/druid/elements/hidden_field_spec.rb +10 -0
- data/spec/druid/elements/image_spec.rb +23 -0
- data/spec/druid/elements/itatic_spec.rb +11 -0
- data/spec/druid/elements/label_spec.rb +10 -0
- data/spec/druid/elements/link_spec.rb +10 -0
- data/spec/druid/elements/list_item_spec.rb +10 -0
- data/spec/druid/elements/media_spec.rb +12 -0
- data/spec/druid/elements/option_spec.rb +21 -0
- data/spec/druid/elements/ordered_list_spec.rb +38 -0
- data/spec/druid/elements/page_factory_spec.rb +40 -0
- data/spec/druid/elements/paragraph_spec.rb +12 -0
- data/spec/druid/elements/radio_button_spec.rb +14 -0
- data/spec/druid/elements/select_list_spec.rb +51 -0
- data/spec/druid/elements/span_spec.rb +10 -0
- data/spec/druid/elements/table_cell_spec.rb +14 -0
- data/spec/druid/elements/table_row_spec.rb +34 -0
- data/spec/druid/elements/table_spec.rb +47 -0
- data/spec/druid/elements/text_area_spec.rb +13 -0
- data/spec/druid/elements/text_field_spec.rb +22 -0
- data/spec/druid/elements/unordered_list_spec.rb +39 -0
- data/spec/druid/javascript_framework_facade_spec.rb +59 -0
- data/spec/druid/nested_element_spec.rb +128 -0
- data/spec/druid/page_factory_spec.rb +235 -0
- data/spec/druid/page_populator_spec.rb +173 -0
- data/spec/druid/page_section_spec.rb +70 -0
- data/spec/spec_helper.rb +9 -0
- metadata +517 -0
@@ -0,0 +1,127 @@
|
|
1
|
+
Feature: Table
|
2
|
+
In order to interact with tables
|
3
|
+
Testers will need access and interrogation ability
|
4
|
+
|
5
|
+
Background:
|
6
|
+
Given I am on the static elements page
|
7
|
+
|
8
|
+
Scenario: Retrieve a table
|
9
|
+
When I retrieve a table element
|
10
|
+
Then I should know it is visible
|
11
|
+
Then I should know it exists
|
12
|
+
|
13
|
+
Scenario: Retrieve data from a table using a row header
|
14
|
+
When I retrieve a table element
|
15
|
+
Then the data for row "Data3" should be "Data3" and "Data4"
|
16
|
+
|
17
|
+
Scenario: Retrieve data from a table using a partial row header
|
18
|
+
When I retrieve a table element
|
19
|
+
Then the data for row "ata3" should be "Data3" and "Data4"
|
20
|
+
|
21
|
+
Scenario: Retrieve data from a table using a row header in the 2nd column
|
22
|
+
When I retrieve a table element
|
23
|
+
Then the data for row "Data4" should be "Data3" and "Data4"
|
24
|
+
|
25
|
+
Scenario: Retrieve data from a table using a partial row header in the 2nd column
|
26
|
+
When I retrieve a table element
|
27
|
+
Then the data for row "ata4" should be "Data3" and "Data4"
|
28
|
+
|
29
|
+
Scenario: Retrieve data from a table using a column header
|
30
|
+
When I retrieve a table element
|
31
|
+
Then the data for column "Header" and row "3" should be "Data4"
|
32
|
+
|
33
|
+
Scenario: Retrieve data from a table using a partial column header
|
34
|
+
When I retrieve a table element
|
35
|
+
Then the data for column "eader" and row "3" should be "Data4"
|
36
|
+
|
37
|
+
Scenario: Retrieve data from a table using both headers
|
38
|
+
When I retrieve a table element
|
39
|
+
Then the data for row "Data3" and column "eader" should be "Data4"
|
40
|
+
|
41
|
+
Scenario: Retrieve data from a table with an incorrect row header
|
42
|
+
When I retrieve a table element
|
43
|
+
Then the data for row "Data20" should be nil
|
44
|
+
|
45
|
+
Scenario: Retrieve data from a table with an incorrect column header
|
46
|
+
When I retrieve a table element
|
47
|
+
Then the data for row "Data3" and column "Data20" should be nil
|
48
|
+
|
49
|
+
Scenario: Retrieve data from a table that does not have a cell which corresponds to a column header
|
50
|
+
When I retrieve a table with thead element
|
51
|
+
Then the data for row "Data5" and column "Col2" should be nil
|
52
|
+
|
53
|
+
@name
|
54
|
+
Scenario Outline: Locating table cells on the Page
|
55
|
+
When I retrieve a table element by "<locate_by>"
|
56
|
+
Then the data for row "2" should be "Data1" and "Data2"
|
57
|
+
|
58
|
+
Examples:
|
59
|
+
| locate_by |
|
60
|
+
| id |
|
61
|
+
| class |
|
62
|
+
| xpath |
|
63
|
+
| index |
|
64
|
+
| css |
|
65
|
+
|
66
|
+
Scenario: Retrieve the data from a table
|
67
|
+
When I retrieve a table element
|
68
|
+
Then the data for row "2" should be "Data1" and "Data2"
|
69
|
+
And the data for row "3" should be "Data3" and "Data4"
|
70
|
+
And the table should have "3" rows
|
71
|
+
And row "2" should have "2" columns
|
72
|
+
And the data for the second row should be "Data1" and "Data2"
|
73
|
+
|
74
|
+
@multi
|
75
|
+
Scenario Outline: Locating table using multiple parameters
|
76
|
+
When I retrieve a table element bys "<param1>" and "<param2>"
|
77
|
+
Then the data for row "2" should be "Data1" and "Data2"
|
78
|
+
|
79
|
+
Examples:
|
80
|
+
| param1 | param2 |
|
81
|
+
| class | index |
|
82
|
+
|
83
|
+
@locator
|
84
|
+
Scenario: Finding a table dynamically
|
85
|
+
When I retrieve a table element while the script is executing
|
86
|
+
Then I should see that the table exists
|
87
|
+
And the data for row "2" should be "Data1" and "Data2"
|
88
|
+
|
89
|
+
Scenario: Retrieve data from a table with a thead using a column header
|
90
|
+
When I retrieve a table with thead element
|
91
|
+
Then the data for column "Col1" and row "2" should be "Data1"
|
92
|
+
|
93
|
+
Scenario: Retrieve data from the first row of a table with a thead using a column header
|
94
|
+
When I retrieve a table with thead element
|
95
|
+
Then the data for column "Col1" and row "1" should be "Col1"
|
96
|
+
|
97
|
+
Scenario: Getting the text from a table
|
98
|
+
Then I should see the text includes "Data1" when I retrieve it by "id"
|
99
|
+
And I should see the text includes "Data2" when I retrieve it by "id"
|
100
|
+
|
101
|
+
Scenario: Matching the expected table with the table on the Page
|
102
|
+
When I retrieve a table element
|
103
|
+
Then the table should be like the expected one
|
104
|
+
| Table | Header |
|
105
|
+
| Data1 | Data2 |
|
106
|
+
| Data3 | Data4 |
|
107
|
+
|
108
|
+
Scenario: Get rows by text with special chars
|
109
|
+
When I retrieve a table element with regex characters
|
110
|
+
Then the data for row "Price1 |" should be "Price1 |" and "$420.99"
|
111
|
+
And the data for row "rice |" should be "Price |" and "$69.99"
|
112
|
+
And the data for row "$420.99" should be "Price1 |" and "$420.99"
|
113
|
+
And the data for row "$420" should be "Price1 |" and "$420.99"
|
114
|
+
|
115
|
+
Scenario: Retrieving column values using header string
|
116
|
+
When I ask for the column values for "Header"
|
117
|
+
Then I should receive:
|
118
|
+
| values |
|
119
|
+
| Data2 |
|
120
|
+
| Data4 |
|
121
|
+
|
122
|
+
Scenario: Retrieving column values using a column number
|
123
|
+
When I ask for the column values for column 1
|
124
|
+
Then I should receive:
|
125
|
+
| values |
|
126
|
+
| Data2 |
|
127
|
+
| Data4 |
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Feature: Table Cell
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am on the static elements page
|
5
|
+
|
6
|
+
Scenario: Retrieving the text from a table cell
|
7
|
+
When I retrieve the data from the table cell
|
8
|
+
Then the cell data should be 'Data4'
|
9
|
+
|
10
|
+
@name
|
11
|
+
Scenario Outline: Locating table cells on the Page
|
12
|
+
When I locate the table cell by "<locate_by>"
|
13
|
+
Then the cell data should be 'Data4'
|
14
|
+
|
15
|
+
Examples:
|
16
|
+
| locate_by |
|
17
|
+
| id |
|
18
|
+
| class |
|
19
|
+
| xpath |
|
20
|
+
| index |
|
21
|
+
| text |
|
22
|
+
| css |
|
23
|
+
|
24
|
+
Scenario: Retrieve a cell from a table by id
|
25
|
+
When I retrieve table cell
|
26
|
+
Then I should know it exists
|
27
|
+
And I should know it is visible
|
28
|
+
|
29
|
+
@multi
|
30
|
+
Scenario Outline: Locating table cell using multiple parameters
|
31
|
+
When I retrieve a table cell element by "<param1>" and "<param2>"
|
32
|
+
Then the cell data should be 'Data4'
|
33
|
+
|
34
|
+
Examples:
|
35
|
+
| param1 | param2 |
|
36
|
+
| class | index |
|
37
|
+
|
38
|
+
@locator
|
39
|
+
Scenario: Finding a table cell dynamically
|
40
|
+
When I retrieve a table cell element while the script is executing
|
41
|
+
Then I should see that the cell exists
|
42
|
+
And the cell data should be 'Data4'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
Feature: Table Row
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am on the static elements page
|
5
|
+
|
6
|
+
Scenario: Retrieving the text from a table row
|
7
|
+
When I retrieve the data from the table row
|
8
|
+
Then the row data should be "Data1 Data2"
|
9
|
+
|
10
|
+
Scenario Outline: Locating table rows on the Page
|
11
|
+
When I search for the table row by "<search_by>"
|
12
|
+
Then the row data should be "Data1 Data2"
|
13
|
+
|
14
|
+
Examples:
|
15
|
+
| search_by |
|
16
|
+
| id |
|
17
|
+
| class |
|
18
|
+
| xpath |
|
19
|
+
| css |
|
20
|
+
| text |
|
21
|
+
| index |
|
22
|
+
|
23
|
+
Scenario: Locating table row using multiple parameters
|
24
|
+
When I retrieve a table row element by "class" and "index"
|
25
|
+
Then the row data should be "Data1 Data2"
|
26
|
+
|
27
|
+
Scenario: Finding a table row dynamically
|
28
|
+
When I retrieve a table row element while the script is executing
|
29
|
+
Then I should see that the row exists
|
30
|
+
And the row data should be "Data1 Data2"
|
@@ -0,0 +1,44 @@
|
|
1
|
+
Feature: Text Area
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am on the static elements page
|
5
|
+
|
6
|
+
Scenario: Setting and getting a value from a text area
|
7
|
+
When I type "abcdefghijklmnop" into the text area
|
8
|
+
Then the text area should contain "abcdefghijklmnop"
|
9
|
+
|
10
|
+
Scenario Outline: Locating text area on the Page
|
11
|
+
When I locate the text area by "<locate_by>"
|
12
|
+
Then I should be able to type "I found it" into the area
|
13
|
+
|
14
|
+
Examples:
|
15
|
+
| locate_by |
|
16
|
+
| id |
|
17
|
+
| class |
|
18
|
+
| name |
|
19
|
+
| xpath |
|
20
|
+
| index |
|
21
|
+
| label |
|
22
|
+
| css |
|
23
|
+
|
24
|
+
@multi
|
25
|
+
Scenario Outline: Locating a text area using multiple parameters
|
26
|
+
When I search for the text area by "<param1>" and "<param2>"
|
27
|
+
Then I should be able to type "I found it" into the area
|
28
|
+
|
29
|
+
Examples:
|
30
|
+
| param1 | param2 |
|
31
|
+
| class | index |
|
32
|
+
| name | index |
|
33
|
+
|
34
|
+
@locator
|
35
|
+
Scenario: Finding a text area dynamically
|
36
|
+
When I find a text area while the script is executing
|
37
|
+
Then I should see that the text area exists
|
38
|
+
And I should be able to type "I found it" into the area element
|
39
|
+
|
40
|
+
Scenario: Clearing the text area
|
41
|
+
When I type "abcdefghijklmnop" into the text area
|
42
|
+
Then the text area should contain "abcdefghijklmnop"
|
43
|
+
When I clear the text area
|
44
|
+
Then the text area should contain ""
|
@@ -0,0 +1,53 @@
|
|
1
|
+
Feature: Text Fields
|
2
|
+
In order to interact with text fields
|
3
|
+
Testers will need access and interrogation ability
|
4
|
+
|
5
|
+
Background:
|
6
|
+
Given I am on the static elements page
|
7
|
+
|
8
|
+
Scenario: Setting and getting a value from a text field
|
9
|
+
When I type "abcDEF" into the text field
|
10
|
+
Then the text field should contain "abcDEF"
|
11
|
+
|
12
|
+
@dev
|
13
|
+
Scenario Outline: Locating text fields on the Page
|
14
|
+
When I locate the text field by "<locate_by>"
|
15
|
+
Then I should be able to type "I found it" into the field
|
16
|
+
|
17
|
+
Examples:
|
18
|
+
| locate_by |
|
19
|
+
| id |
|
20
|
+
| class |
|
21
|
+
| name |
|
22
|
+
| xpath |
|
23
|
+
| index |
|
24
|
+
| title |
|
25
|
+
| label |
|
26
|
+
| css |
|
27
|
+
| data_field|
|
28
|
+
|
29
|
+
Scenario: Retrieve a text field
|
30
|
+
When I retrieve a text field
|
31
|
+
Then I should know it exists
|
32
|
+
And I should know it is visible
|
33
|
+
|
34
|
+
@multi
|
35
|
+
Scenario Outline: Locating a text field using multiple parameters
|
36
|
+
When I search for the text field by "<param1>" and "<param2>"
|
37
|
+
Then I should be able to type "I found it" into the field
|
38
|
+
|
39
|
+
Examples:
|
40
|
+
| param1 | param2 |
|
41
|
+
| class | index |
|
42
|
+
| name | index |
|
43
|
+
|
44
|
+
@locator
|
45
|
+
Scenario: Finding a text field dynamically
|
46
|
+
When I find a text field while the script is executing
|
47
|
+
Then I should see that the text field exists
|
48
|
+
And I should be able to type "i found it" into the field element
|
49
|
+
|
50
|
+
Scenario: Appending text to a text field
|
51
|
+
When I type "abcd" into the text field
|
52
|
+
And I append "efg" to the text field
|
53
|
+
Then the text field should contain "abcdefg"
|
@@ -0,0 +1,46 @@
|
|
1
|
+
Feature: Unordered list
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am on the static elements page
|
5
|
+
|
6
|
+
Scenario: Getting the first element from the unordered list
|
7
|
+
When I get the first item from the unordered list
|
8
|
+
Then the list item's text should be "Item One"
|
9
|
+
|
10
|
+
@name
|
11
|
+
Scenario Outline: Locating unordered lists on the page
|
12
|
+
When I locate the unordered list by "<locate_by>"
|
13
|
+
And I get the first item from the list
|
14
|
+
Then the list item's text should be "Item One"
|
15
|
+
And the list should contain 3 items
|
16
|
+
And each item should contain "Item"
|
17
|
+
|
18
|
+
Examples:
|
19
|
+
| locate_by |
|
20
|
+
| id |
|
21
|
+
| class |
|
22
|
+
| xpath |
|
23
|
+
| index |
|
24
|
+
| css |
|
25
|
+
|
26
|
+
@multi
|
27
|
+
Scenario Outline: Locating unordered lists using multiple parameters
|
28
|
+
When I search for the unordered list by "<param1>" and "<param2>"
|
29
|
+
And I get the first item from the list
|
30
|
+
Then the list items text should be "Item One"
|
31
|
+
|
32
|
+
Examples:
|
33
|
+
| param1 | param2 |
|
34
|
+
| class | index |
|
35
|
+
|
36
|
+
@locator
|
37
|
+
Scenario: Finding a unordered list dynamically
|
38
|
+
When I search for the unordered list while the script is executing
|
39
|
+
Then I should see that the unordered list exists
|
40
|
+
When I get the first item from the list
|
41
|
+
Then the list items text should be "Item One"
|
42
|
+
|
43
|
+
Scenario: Getting the text from an unordered list
|
44
|
+
Then the text for the unordered list should contain "Item One"
|
45
|
+
And the text for the unordered list should contain "Item Two"
|
46
|
+
And the text for the unordered list should contain "Item Three"
|
@@ -0,0 +1,66 @@
|
|
1
|
+
Feature: Support for video element
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am on the audio video page
|
5
|
+
|
6
|
+
Scenario: Finding an video element
|
7
|
+
When I retrieve the video element
|
8
|
+
Then I should know it exists
|
9
|
+
And I should know it is visible
|
10
|
+
|
11
|
+
Scenario Outline: Locating a video element on the page
|
12
|
+
When I search for the video element by "<search_by>"
|
13
|
+
Then I should know it is visible
|
14
|
+
|
15
|
+
Examples:
|
16
|
+
| search_by |
|
17
|
+
| id |
|
18
|
+
| class |
|
19
|
+
| xpath |
|
20
|
+
| index |
|
21
|
+
| css |
|
22
|
+
|
23
|
+
Scenario Outline: Locating videos using multiple parameters
|
24
|
+
When I search for the video element by "<param1>" and "<param2>"
|
25
|
+
Then I should know it is visible
|
26
|
+
|
27
|
+
Examples:
|
28
|
+
| param1 | param2 |
|
29
|
+
| class | index |
|
30
|
+
|
31
|
+
Scenario: Should know if it is autoplay
|
32
|
+
When I retrieve the video element
|
33
|
+
Then I should know the video is not autoplay
|
34
|
+
|
35
|
+
Scenario: Should know if the controls are displayed
|
36
|
+
When I retrieve the video element
|
37
|
+
Then I should know that the controls are displayed
|
38
|
+
|
39
|
+
Scenario: Should know if it is paused
|
40
|
+
When I retrieve the video element
|
41
|
+
Then I should know that the video is paused
|
42
|
+
|
43
|
+
Scenario: Should know its volume
|
44
|
+
When I retrieve the video element
|
45
|
+
Then I should know that its volume is 1
|
46
|
+
|
47
|
+
Scenario: Should know its height and width
|
48
|
+
When I retrieve the video element
|
49
|
+
Then I should know that its height is 240 pixels
|
50
|
+
And I should knot what its width is 320 pixels
|
51
|
+
|
52
|
+
Scenario: Should know if it has ended
|
53
|
+
When I retrieve the video element
|
54
|
+
Then I should know that it has not ended
|
55
|
+
|
56
|
+
Scenario: Should know if it is seeking
|
57
|
+
When I retrieve the video element
|
58
|
+
Then I should know that it is not seeking
|
59
|
+
|
60
|
+
Scenario: Should know if it is in a loop
|
61
|
+
When I retrieve the video element
|
62
|
+
Then I should know that it is not in a loop
|
63
|
+
|
64
|
+
Scenario: Should know if it is muted
|
65
|
+
When I retrieve the video element
|
66
|
+
Then I should know that it is muted
|