page-object 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rvmrc +1 -1
- data/ChangeLog +12 -6
- data/README.md +1 -1
- data/Rakefile +3 -19
- data/features/async.feature +8 -8
- data/features/button.feature +7 -7
- data/features/check_box.feature +8 -8
- data/features/div.feature +7 -6
- data/features/element_attributes.feature +14 -14
- data/features/form.feature +5 -5
- data/features/frames.feature +12 -0
- data/features/hidden_field.feature +5 -5
- data/features/html/frame_1.html +18 -0
- data/features/html/frame_2.html +16 -0
- data/features/html/frames.html +11 -0
- data/features/html/iframes.html +12 -0
- data/features/html/static_elements.html +50 -42
- data/features/html/success.html +5 -5
- data/features/image.feature +11 -11
- data/features/link.feature +1 -1
- data/features/list_item.feature +5 -5
- data/features/ordered_list.feature +6 -6
- data/features/page_level_actions.feature +16 -5
- data/features/radio_button.feature +12 -12
- data/features/select_list.feature +12 -12
- data/features/span.feature +5 -5
- data/features/step_definitions/accessor_steps.rb +2 -2
- data/features/step_definitions/async_steps.rb +1 -1
- data/features/step_definitions/element_steps.rb +1 -1
- data/features/step_definitions/frames_steps.rb +21 -0
- data/features/step_definitions/page_level_actions_steps.rb +24 -2
- data/features/step_definitions/page_traversal_steps.rb +0 -1
- data/features/support/env.rb +20 -6
- data/features/support/page.rb +14 -11
- data/features/support/url_helper.rb +4 -0
- data/features/table.feature +9 -9
- data/features/table_cell.feature +6 -6
- data/features/text_area.feature +6 -6
- data/features/text_field.feature +7 -7
- data/features/unordered_list.feature +6 -6
- data/lib/page-object.rb +40 -16
- data/lib/page-object/accessors.rb +15 -15
- data/lib/page-object/elements.rb +0 -1
- data/lib/page-object/elements/button.rb +24 -24
- data/lib/page-object/elements/div.rb +8 -3
- data/lib/page-object/elements/element.rb +27 -28
- data/lib/page-object/elements/form.rb +7 -7
- data/lib/page-object/elements/hidden_field.rb +5 -5
- data/lib/page-object/elements/image.rb +8 -8
- data/lib/page-object/elements/link.rb +9 -9
- data/lib/page-object/elements/list_item.rb +1 -1
- data/lib/page-object/elements/option.rb +1 -1
- data/lib/page-object/elements/ordered_list.rb +13 -13
- data/lib/page-object/elements/select_list.rb +6 -6
- data/lib/page-object/elements/span.rb +2 -2
- data/lib/page-object/elements/table.rb +11 -11
- data/lib/page-object/elements/table_row.rb +9 -9
- data/lib/page-object/elements/text_area.rb +4 -4
- data/lib/page-object/elements/text_field.rb +4 -4
- data/lib/page-object/elements/unordered_list.rb +13 -13
- data/lib/page-object/loads_platform.rb +24 -0
- data/lib/page-object/page_factory.rb +3 -3
- data/lib/page-object/platforms.rb +18 -0
- data/lib/page-object/platforms/selenium.rb +16 -0
- data/lib/page-object/platforms/selenium/button.rb +15 -0
- data/lib/page-object/platforms/selenium/element.rb +168 -0
- data/lib/page-object/platforms/selenium/form.rb +16 -0
- data/lib/page-object/platforms/selenium/image.rb +28 -0
- data/lib/page-object/platforms/selenium/link.rb +16 -0
- data/lib/page-object/platforms/selenium/ordered_list.rb +33 -0
- data/lib/page-object/platforms/selenium/page_object.rb +524 -0
- data/lib/page-object/platforms/selenium/select_list.rb +32 -0
- data/lib/page-object/platforms/selenium/table.rb +40 -0
- data/lib/page-object/platforms/selenium/table_row.rb +32 -0
- data/lib/page-object/platforms/selenium/unordered_list.rb +33 -0
- data/lib/page-object/platforms/watir.rb +16 -0
- data/lib/page-object/platforms/watir/element.rb +154 -0
- data/lib/page-object/platforms/watir/form.rb +16 -0
- data/lib/page-object/platforms/watir/image.rb +22 -0
- data/lib/page-object/platforms/watir/ordered_list.rb +32 -0
- data/lib/page-object/{watir_page_object.rb → platforms/watir/page_object.rb} +62 -35
- data/lib/page-object/platforms/watir/select_list.rb +33 -0
- data/lib/page-object/platforms/watir/table.rb +27 -0
- data/lib/page-object/platforms/watir/table_row.rb +24 -0
- data/lib/page-object/platforms/watir/unordered_list.rb +33 -0
- data/lib/page-object/version.rb +1 -1
- data/page-object.gemspec +13 -13
- data/spec/page-object/accessors_spec.rb +142 -108
- data/spec/page-object/elements/button_spec.rb +33 -33
- data/spec/page-object/elements/check_box_spec.rb +1 -1
- data/spec/page-object/elements/div_spec.rb +3 -3
- data/spec/page-object/elements/element_spec.rb +51 -41
- data/spec/page-object/elements/form_spec.rb +3 -3
- data/spec/page-object/elements/hidden_field_spec.rb +3 -3
- data/spec/page-object/elements/image_spec.rb +7 -7
- data/spec/page-object/elements/link_spec.rb +8 -8
- data/spec/page-object/elements/list_item_spec.rb +1 -1
- data/spec/page-object/elements/ordered_list_spec.rb +9 -9
- data/spec/page-object/elements/radio_button_spec.rb +1 -1
- data/spec/page-object/elements/select_list_spec.rb +2 -2
- data/spec/page-object/elements/span_spec.rb +1 -1
- data/spec/page-object/elements/table_row_spec.rb +6 -6
- data/spec/page-object/elements/table_spec.rb +9 -9
- data/spec/page-object/elements/text_area_spec.rb +3 -3
- data/spec/page-object/elements/text_field_spec.rb +3 -3
- data/spec/page-object/elements/unordered_list_spec.rb +10 -10
- data/spec/page-object/loads_platform_spec.rb +38 -0
- data/spec/page-object/page-object_spec.rb +70 -10
- data/spec/page-object/page_factory_spec.rb +3 -3
- data/spec/page-object/{selenium_page_object_spec.rb → platforms/selenium/selenium_page_object_spec.rb} +10 -3
- data/spec/page-object/platforms/selenium_spec.rb +26 -0
- data/spec/page-object/platforms/watir_spec.rb +27 -0
- data/spec/spec_helper.rb +18 -5
- metadata +48 -26
- data/lib/page-object/platforms/selenium_button.rb +0 -13
- data/lib/page-object/platforms/selenium_element.rb +0 -142
- data/lib/page-object/platforms/selenium_form.rb +0 -14
- data/lib/page-object/platforms/selenium_image.rb +0 -26
- data/lib/page-object/platforms/selenium_link.rb +0 -13
- data/lib/page-object/platforms/selenium_ordered_list.rb +0 -31
- data/lib/page-object/platforms/selenium_select_list.rb +0 -29
- data/lib/page-object/platforms/selenium_table.rb +0 -38
- data/lib/page-object/platforms/selenium_table_row.rb +0 -29
- data/lib/page-object/platforms/selenium_unordered_list.rb +0 -31
- data/lib/page-object/platforms/watir_element.rb +0 -136
- data/lib/page-object/platforms/watir_form.rb +0 -14
- data/lib/page-object/platforms/watir_image.rb +0 -20
- data/lib/page-object/platforms/watir_ordered_list.rb +0 -30
- data/lib/page-object/platforms/watir_select_list.rb +0 -30
- data/lib/page-object/platforms/watir_table.rb +0 -24
- data/lib/page-object/platforms/watir_table_row.rb +0 -22
- data/lib/page-object/platforms/watir_unordered_list.rb +0 -31
- data/lib/page-object/selenium_page_object.rb +0 -486
data/.rvmrc
CHANGED
@@ -1 +1 @@
|
|
1
|
-
rvm 1.9.2-
|
1
|
+
rvm 1.9.2-p180@page-object --create
|
data/ChangeLog
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
=== Version 0.2.1 / 2011-07-29
|
2
|
+
* Enhancements
|
3
|
+
* Added ability to locate div by the contained text
|
4
|
+
* Added #attach_to_window so a page object and operate on another window
|
5
|
+
* Added #switch_to_frame to allow one to switch to a frame
|
6
|
+
* Added #send_keys to PageObject::Elements::Element
|
7
|
+
* Added #refresh to page object
|
8
|
+
* Work toward making drivers pluggable
|
9
|
+
* Updated to use selenium-webdriver 2.2.0
|
10
|
+
* Updated to use watir-webdriver 0.2.8
|
11
|
+
|
1
12
|
=== Version 0.2 / 2011-07-24
|
2
13
|
* Enhancements
|
3
14
|
* Async handling
|
@@ -10,12 +21,7 @@
|
|
10
21
|
* Handling popups
|
11
22
|
* Added #alert to page object to override default alert popup behavior
|
12
23
|
* Added #confirm to page object to override default confirm popup behavior
|
13
|
-
* Added #prompt to page object to override default prompt popup
|
14
|
-
watir_browser.should_receive(:prompt)
|
15
|
-
watir_page_object.prompt("blah") do
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
24
|
+
* Added #prompt to page object to override default prompt popup behavior
|
19
25
|
* Updated to use selenium-webdriver 2.1.0
|
20
26
|
|
21
27
|
=== Version 0.1.1 / 2011-07-16
|
data/README.md
CHANGED
@@ -51,7 +51,7 @@ Another approach might be to create higher level methods on our page object that
|
|
51
51
|
text_field(:password, :id => 'password')
|
52
52
|
button(:login, :id => 'login')
|
53
53
|
|
54
|
-
def login_with(username, password)
|
54
|
+
def login_with(username, password)
|
55
55
|
self.username = username
|
56
56
|
self.password = password
|
57
57
|
login
|
data/Rakefile
CHANGED
@@ -8,7 +8,7 @@ Bundler::GemHelper.install_tasks
|
|
8
8
|
|
9
9
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
10
10
|
spec.ruby_opts = "-I lib:spec"
|
11
|
-
spec.pattern
|
11
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
12
12
|
end
|
13
13
|
task :spec
|
14
14
|
|
@@ -16,11 +16,11 @@ namespace :features do
|
|
16
16
|
Cucumber::Rake::Task.new(:watir, "Run features with Watir") do |t|
|
17
17
|
t.profile = "watir"
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
Cucumber::Rake::Task.new(:selenium, "Run features with Selenium") do |t|
|
21
21
|
t.profile = "selenium"
|
22
22
|
end
|
23
|
-
|
23
|
+
|
24
24
|
desc 'Run all features'
|
25
25
|
task :all => [:watir, :selenium]
|
26
26
|
end
|
@@ -33,19 +33,3 @@ task :lib do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
task :default => :spec
|
36
|
-
|
37
|
-
|
38
|
-
begin
|
39
|
-
require 'yard'
|
40
|
-
Rake::Task[:lib].invoke
|
41
|
-
require "yard/handlers/page-object"
|
42
|
-
YARD::Rake::YardocTask.new do |task|
|
43
|
-
task.options = %w[--debug] # this is pretty slow, so nice with some output
|
44
|
-
end
|
45
|
-
rescue LoadError
|
46
|
-
task :yard do
|
47
|
-
abort "YARD is not available. In order to run yardoc, you must: sudo gem install yard"
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
|
data/features/async.feature
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Feature: Handling Asynch calls
|
2
2
|
|
3
|
-
Background:
|
4
|
-
|
3
|
+
Background:
|
4
|
+
Given I am on the static elements page
|
5
5
|
|
6
|
-
Scenario: Link element methods
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
Scenario: Link element methods
|
7
|
+
When I retrieve a link element
|
8
|
+
Then I should be able to wait until it is present
|
9
|
+
And I should be able to wait until it is visible
|
10
|
+
And I should be able to wait until it is not visible
|
11
|
+
And I should be able to wait until a block returns true
|
data/features/button.feature
CHANGED
@@ -2,14 +2,14 @@ Feature: Button
|
|
2
2
|
In order to interact with buttons
|
3
3
|
Testers will need access and interrogation ability
|
4
4
|
|
5
|
-
|
5
|
+
|
6
6
|
Background:
|
7
7
|
Given I am on the static elements page
|
8
|
-
|
8
|
+
|
9
9
|
Scenario: Getting the text from a div
|
10
10
|
When I click the button
|
11
11
|
Then I should be on the success page
|
12
|
-
|
12
|
+
|
13
13
|
Scenario: Retrieve a button element
|
14
14
|
When I retrieve a button element
|
15
15
|
Then I should know it exists
|
@@ -24,7 +24,7 @@ Feature: Button
|
|
24
24
|
| id |
|
25
25
|
| class |
|
26
26
|
| name |
|
27
|
-
| xpath |
|
27
|
+
| xpath |
|
28
28
|
| index |
|
29
29
|
|
30
30
|
@watir_only
|
@@ -41,6 +41,6 @@ Feature: Button
|
|
41
41
|
Then I should be able to click the button
|
42
42
|
|
43
43
|
Scenarios:
|
44
|
-
| param1
|
45
|
-
| class
|
46
|
-
| name
|
44
|
+
| param1 | param2 |
|
45
|
+
| class | index |
|
46
|
+
| name | index |
|
data/features/check_box.feature
CHANGED
@@ -2,10 +2,10 @@ Feature: Check Box
|
|
2
2
|
In order to interact with check boxes
|
3
3
|
Testers will need access and interrogation ability
|
4
4
|
|
5
|
-
|
5
|
+
|
6
6
|
Background:
|
7
7
|
Given I am on the static elements page
|
8
|
-
|
8
|
+
|
9
9
|
Scenario: Selecting an element on the select list
|
10
10
|
When I select the First check box
|
11
11
|
Then the First check box should be selected
|
@@ -15,13 +15,13 @@ Feature: Check Box
|
|
15
15
|
Scenario Outline: Locating check boxes on the page
|
16
16
|
When I search for the check box by "<search_by>"
|
17
17
|
Then I should be able to check the check box
|
18
|
-
|
18
|
+
|
19
19
|
Scenarios:
|
20
20
|
| search_by |
|
21
21
|
| id |
|
22
22
|
| class |
|
23
23
|
| name |
|
24
|
-
| xpath |
|
24
|
+
| xpath |
|
25
25
|
| index |
|
26
26
|
|
27
27
|
Scenario Outline: Locating check boxes using multiple parameters
|
@@ -29,11 +29,11 @@ Feature: Check Box
|
|
29
29
|
Then I should be able to check the check box
|
30
30
|
|
31
31
|
Scenarios:
|
32
|
-
| param1
|
33
|
-
| class
|
34
|
-
| name
|
32
|
+
| param1 | param2 |
|
33
|
+
| class | index |
|
34
|
+
| name | index |
|
35
|
+
|
35
36
|
|
36
|
-
|
37
37
|
Scenario: Retrieve a CheckBox
|
38
38
|
When I retrieve a check box element
|
39
39
|
Then I should know it exists
|
data/features/div.feature
CHANGED
@@ -2,10 +2,10 @@ Feature: Div
|
|
2
2
|
In order to interact with divs
|
3
3
|
Testers will need access and interrogation ability
|
4
4
|
|
5
|
-
|
5
|
+
|
6
6
|
Background:
|
7
7
|
Given I am on the static elements page
|
8
|
-
|
8
|
+
|
9
9
|
Scenario: Getting the text from a div
|
10
10
|
When I get the text from the div
|
11
11
|
Then the text should be "page-object rocks!"
|
@@ -23,15 +23,16 @@ Feature: Div
|
|
23
23
|
| search_by |
|
24
24
|
| id |
|
25
25
|
| class |
|
26
|
-
| xpath |
|
26
|
+
| xpath |
|
27
27
|
| index |
|
28
28
|
| name |
|
29
|
+
| text |
|
29
30
|
|
30
31
|
Scenario Outline: Locating divs using multiple parameters
|
31
32
|
When I search for the div by "<param1>" and "<param2>"
|
32
33
|
Then the text should be "page-object rocks!"
|
33
34
|
|
34
35
|
Scenarios:
|
35
|
-
| param1
|
36
|
-
| class
|
37
|
-
| name
|
36
|
+
| param1 | param2 |
|
37
|
+
| class | index |
|
38
|
+
| name | index |
|
@@ -12,12 +12,12 @@ Feature: Attributes on Elements
|
|
12
12
|
And I should know its' tag name is "a"
|
13
13
|
And I should know the attribute "readonly" is false
|
14
14
|
And I should be able to click it
|
15
|
-
|
15
|
+
|
16
16
|
@watir_only
|
17
17
|
Scenario: Link element methods for watir
|
18
18
|
When I retrieve a link element
|
19
19
|
Then I should know its' value is ""
|
20
|
-
|
20
|
+
|
21
21
|
|
22
22
|
Scenario: Button element methods
|
23
23
|
When I retrieve a button element
|
@@ -28,7 +28,7 @@ Feature: Attributes on Elements
|
|
28
28
|
And I should know its' tag name is "input"
|
29
29
|
And I should know the attribute "readonly" is false
|
30
30
|
And I should be able to click it
|
31
|
-
|
31
|
+
|
32
32
|
@watir_only
|
33
33
|
Scenario: Button element methods for watir
|
34
34
|
When I retrieve a button element
|
@@ -44,7 +44,7 @@ Feature: Attributes on Elements
|
|
44
44
|
And I should know its' tag name is "input"
|
45
45
|
And I should know the attribute "readonly" is false
|
46
46
|
And I should be able to click it
|
47
|
-
|
47
|
+
|
48
48
|
Scenario: Div element methods
|
49
49
|
When I retrieve the div element
|
50
50
|
Then I should know it exists
|
@@ -59,7 +59,7 @@ Feature: Attributes on Elements
|
|
59
59
|
Scenario: Div element methods for watir
|
60
60
|
When I retrieve the div element
|
61
61
|
Then I should know its' value is ""
|
62
|
-
|
62
|
+
|
63
63
|
@selenium_only
|
64
64
|
Scenario: Div element methods for selenium
|
65
65
|
When I retrieve the div element
|
@@ -83,7 +83,7 @@ Feature: Attributes on Elements
|
|
83
83
|
And I should know its' text includes "Test 1"
|
84
84
|
And I should know its' value is "option1"
|
85
85
|
And I should know it is equal to itself
|
86
|
-
And I should know its' tag name is "select"
|
86
|
+
And I should know its' tag name is "select"
|
87
87
|
And I should know the attribute "readonly" is false
|
88
88
|
And I should be able to click it
|
89
89
|
|
@@ -92,7 +92,7 @@ Feature: Attributes on Elements
|
|
92
92
|
Then I should know it is visible
|
93
93
|
And I should know its' text includes "Data1"
|
94
94
|
And I should know it is equal to itself
|
95
|
-
And I should know its' tag name is "table"
|
95
|
+
And I should know its' tag name is "table"
|
96
96
|
And I should know the attribute "readonly" is false
|
97
97
|
And I should be able to click it
|
98
98
|
|
@@ -101,19 +101,19 @@ Feature: Attributes on Elements
|
|
101
101
|
When I retrieve a table element
|
102
102
|
Then I should know it exists
|
103
103
|
And I should know its' value is ""
|
104
|
-
|
104
|
+
|
105
105
|
@selenium_only
|
106
106
|
Scenario: Table element methods in selenium
|
107
107
|
When I retrieve a table element
|
108
108
|
Then I should know its' value is nil
|
109
|
-
|
109
|
+
|
110
110
|
Scenario: Table Cell element methods
|
111
111
|
When I retrieve table cell
|
112
112
|
Then I should know it exists
|
113
113
|
And I should know it is visible
|
114
114
|
And I should know its' text includes "Data4"
|
115
115
|
And I should know it is equal to itself
|
116
|
-
And I should know its' tag name is "td"
|
116
|
+
And I should know its' tag name is "td"
|
117
117
|
And I should know the attribute "readonly" is false
|
118
118
|
And I should be able to click it
|
119
119
|
|
@@ -134,7 +134,7 @@ Feature: Attributes on Elements
|
|
134
134
|
And I should know its' text includes ""
|
135
135
|
And I should know its' value is ""
|
136
136
|
And I should know it is equal to itself
|
137
|
-
And I should know its' tag name is "input"
|
137
|
+
And I should know its' tag name is "input"
|
138
138
|
And I should know the attribute "readonly" is false
|
139
139
|
And I should be able to click it
|
140
140
|
|
@@ -145,7 +145,7 @@ Feature: Attributes on Elements
|
|
145
145
|
And I should know its' text includes ""
|
146
146
|
And I should know its' value is ""
|
147
147
|
And I should know it is equal to itself
|
148
|
-
And I should know its' tag name is "textarea"
|
148
|
+
And I should know its' tag name is "textarea"
|
149
149
|
And I should know the attribute "readonly" is false
|
150
150
|
And I should be able to click it
|
151
151
|
|
@@ -176,7 +176,7 @@ Feature: Attributes on Elements
|
|
176
176
|
And I should know its' text includes ""
|
177
177
|
And I should know its' value is "12345"
|
178
178
|
And I should know it is equal to itself
|
179
|
-
And I should know its' tag name is "input"
|
179
|
+
And I should know its' tag name is "input"
|
180
180
|
And I should know the attribute "readonly" is false
|
181
181
|
|
182
182
|
Scenario: Form element methods
|
@@ -185,7 +185,7 @@ Feature: Attributes on Elements
|
|
185
185
|
And I should know it is visible
|
186
186
|
And I should know its' text includes ""
|
187
187
|
And I should know it is equal to itself
|
188
|
-
And I should know its' tag name is "form"
|
188
|
+
And I should know its' tag name is "form"
|
189
189
|
And I should know the attribute "readonly" is false
|
190
190
|
|
191
191
|
@watir_only
|
data/features/form.feature
CHANGED
@@ -2,7 +2,7 @@ Feature: Form
|
|
2
2
|
|
3
3
|
Background:
|
4
4
|
Given I am on the static elements page
|
5
|
-
|
5
|
+
|
6
6
|
Scenario: Submitting a form
|
7
7
|
When I locate the form by "id"
|
8
8
|
Then I should be able to submit the form
|
@@ -15,7 +15,7 @@ Feature: Form
|
|
15
15
|
| search_by |
|
16
16
|
| id |
|
17
17
|
| class |
|
18
|
-
| xpath |
|
18
|
+
| xpath |
|
19
19
|
| index |
|
20
20
|
|
21
21
|
Scenario Outline: Locating table using multiple parameters
|
@@ -23,7 +23,7 @@ Feature: Form
|
|
23
23
|
Then I should be able to submit the form
|
24
24
|
|
25
25
|
Scenarios:
|
26
|
-
| param1
|
27
|
-
| class
|
28
|
-
| name
|
26
|
+
| param1 | param2 |
|
27
|
+
| class | index |
|
28
|
+
| name | index |
|
29
29
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Handling frames
|
2
|
+
|
3
|
+
Background:
|
4
|
+
Given I am on the frame elements page
|
5
|
+
|
6
|
+
Scenario: Switching to a frame by id
|
7
|
+
When I switch to a frame using id "frame_2"
|
8
|
+
Then I should see "Frame 2" in the frame
|
9
|
+
|
10
|
+
Scenario: Switching to a frame by index
|
11
|
+
When I switch to a frame using index "1"
|
12
|
+
Then I should see "Frame 2" in the frame
|
@@ -2,7 +2,7 @@ Feature: Hidden Fields
|
|
2
2
|
|
3
3
|
Background:
|
4
4
|
Given I am on the static elements page
|
5
|
-
|
5
|
+
|
6
6
|
Scenario: Setting and getting a value from a hidden field
|
7
7
|
When I retrieve the hidden field element
|
8
8
|
Then I should see the hidden field contains "12345"
|
@@ -16,7 +16,7 @@ Feature: Hidden Fields
|
|
16
16
|
| id |
|
17
17
|
| class |
|
18
18
|
| name |
|
19
|
-
| xpath |
|
19
|
+
| xpath |
|
20
20
|
| css |
|
21
21
|
| tag_name |
|
22
22
|
| index |
|
@@ -27,6 +27,6 @@ Feature: Hidden Fields
|
|
27
27
|
Then hidden field element should contains "12345"
|
28
28
|
|
29
29
|
Scenarios:
|
30
|
-
| param1
|
31
|
-
| class
|
32
|
-
| name
|
30
|
+
| param1 | param2 |
|
31
|
+
| class | index |
|
32
|
+
| name | index |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Frame 1</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
</head>
|
7
|
+
<body onload="document.senderForm.senderElement.focus()">
|
8
|
+
<h1>Frame 1</h1>
|
9
|
+
<p>Nam accumsan. Donec nisi pede, interdum eget, ultrices ac, vulputate vitae, nunc. Nulla lorem. Duis cursus pharetra dolor. Nulla accumsan hendrerit leo. Vivamus commodo. Nullam dignissim adipiscing est. Aliquam vitae orci in risus lobortis luctus. Ut luctus fermentum ligula. Nullam ipsum. Suspendisse sit amet nisi.</p>
|
10
|
+
<form action="" method="post" name="senderForm">
|
11
|
+
<fieldset>
|
12
|
+
<input type="text" name="senderElement" id="senderElement" value="send_this_value" />
|
13
|
+
<input type="button" id="send" onclick="parent.frame2.document.recieverForm.recieverElement.value = document.senderForm.senderElement.value" value="Send!" />
|
14
|
+
</fieldset>
|
15
|
+
</form>
|
16
|
+
<div id="set_by_js" />
|
17
|
+
</body>
|
18
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Frame 2</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<h1>Frame 2</h1>
|
9
|
+
<p>Vestibulum dignissim mauris id tellus. Nulla volutpat bibendum ante. Nam malesuada, lacus vel ultrices luctus, lorem purus tristique magna, quis pharetra leo ipsum nec neque. Cras ornare tincidunt sem. In hac habitasse platea dictumst. Suspendisse commodo turpis at est. Sed quis tortor. Aenean non massa. Phasellus scelerisque nulla vel lectus. Quisque lorem. Praesent volutpat dignissim risus. Fusce vulputate ligula eu ipsum.</p>
|
10
|
+
<form action="" method="post" name="recieverForm">
|
11
|
+
<fieldset>
|
12
|
+
<input type="text" name="recieverElement" value="old_value" />
|
13
|
+
</fieldset>
|
14
|
+
</form>
|
15
|
+
</body>
|
16
|
+
</html>
|