watir-webdriver 0.1.4 → 0.1.5

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.
Files changed (93) hide show
  1. data/.gitignore +9 -0
  2. data/Gemfile +3 -3
  3. data/Rakefile +3 -28
  4. data/lib/watir-webdriver.rb +1 -0
  5. data/lib/watir-webdriver/version.rb +3 -0
  6. data/watir-webdriver.gemspec +23 -247
  7. metadata +34 -326
  8. data/VERSION +0 -1
  9. data/spec/watirspec/area_spec.rb +0 -77
  10. data/spec/watirspec/areas_spec.rb +0 -45
  11. data/spec/watirspec/browser_spec.rb +0 -274
  12. data/spec/watirspec/button_spec.rb +0 -255
  13. data/spec/watirspec/buttons_spec.rb +0 -58
  14. data/spec/watirspec/checkbox_spec.rb +0 -276
  15. data/spec/watirspec/checkboxes_spec.rb +0 -47
  16. data/spec/watirspec/collections_spec.rb +0 -20
  17. data/spec/watirspec/dd_spec.rb +0 -127
  18. data/spec/watirspec/dds_spec.rb +0 -45
  19. data/spec/watirspec/del_spec.rb +0 -145
  20. data/spec/watirspec/dels_spec.rb +0 -45
  21. data/spec/watirspec/div_spec.rb +0 -221
  22. data/spec/watirspec/divs_spec.rb +0 -45
  23. data/spec/watirspec/dl_spec.rb +0 -137
  24. data/spec/watirspec/dls_spec.rb +0 -46
  25. data/spec/watirspec/dt_spec.rb +0 -127
  26. data/spec/watirspec/dts_spec.rb +0 -45
  27. data/spec/watirspec/element_spec.rb +0 -149
  28. data/spec/watirspec/em_spec.rb +0 -101
  29. data/spec/watirspec/ems_spec.rb +0 -46
  30. data/spec/watirspec/filefield_spec.rb +0 -156
  31. data/spec/watirspec/filefields_spec.rb +0 -46
  32. data/spec/watirspec/font_spec.rb +0 -32
  33. data/spec/watirspec/form_spec.rb +0 -63
  34. data/spec/watirspec/forms_spec.rb +0 -47
  35. data/spec/watirspec/frame_spec.rb +0 -144
  36. data/spec/watirspec/frames_spec.rb +0 -83
  37. data/spec/watirspec/hidden_spec.rb +0 -103
  38. data/spec/watirspec/hiddens_spec.rb +0 -46
  39. data/spec/watirspec/hn_spec.rb +0 -97
  40. data/spec/watirspec/hns_spec.rb +0 -42
  41. data/spec/watirspec/image_spec.rb +0 -208
  42. data/spec/watirspec/images_spec.rb +0 -45
  43. data/spec/watirspec/ins_spec.rb +0 -146
  44. data/spec/watirspec/inses_spec.rb +0 -45
  45. data/spec/watirspec/label_spec.rb +0 -81
  46. data/spec/watirspec/labels_spec.rb +0 -45
  47. data/spec/watirspec/li_spec.rb +0 -116
  48. data/spec/watirspec/lib/guards.rb +0 -59
  49. data/spec/watirspec/lib/implementation.rb +0 -48
  50. data/spec/watirspec/lib/runner.rb +0 -83
  51. data/spec/watirspec/lib/server.rb +0 -194
  52. data/spec/watirspec/lib/watirspec.rb +0 -75
  53. data/spec/watirspec/link_spec.rb +0 -174
  54. data/spec/watirspec/links_spec.rb +0 -49
  55. data/spec/watirspec/lis_spec.rb +0 -45
  56. data/spec/watirspec/map_spec.rb +0 -80
  57. data/spec/watirspec/maps_spec.rb +0 -46
  58. data/spec/watirspec/meta_spec.rb +0 -24
  59. data/spec/watirspec/metas_spec.rb +0 -43
  60. data/spec/watirspec/ol_spec.rb +0 -90
  61. data/spec/watirspec/ols_spec.rb +0 -45
  62. data/spec/watirspec/option_spec.rb +0 -152
  63. data/spec/watirspec/p_spec.rb +0 -132
  64. data/spec/watirspec/pre_spec.rb +0 -116
  65. data/spec/watirspec/pres_spec.rb +0 -45
  66. data/spec/watirspec/ps_spec.rb +0 -45
  67. data/spec/watirspec/radio_spec.rb +0 -262
  68. data/spec/watirspec/radios_spec.rb +0 -46
  69. data/spec/watirspec/select_list_spec.rb +0 -335
  70. data/spec/watirspec/select_lists_spec.rb +0 -49
  71. data/spec/watirspec/span_spec.rb +0 -146
  72. data/spec/watirspec/spans_spec.rb +0 -45
  73. data/spec/watirspec/spec_helper.rb +0 -20
  74. data/spec/watirspec/strong_spec.rb +0 -93
  75. data/spec/watirspec/strongs_spec.rb +0 -46
  76. data/spec/watirspec/table_nesting_spec.rb +0 -50
  77. data/spec/watirspec/table_spec.rb +0 -150
  78. data/spec/watirspec/tables_spec.rb +0 -47
  79. data/spec/watirspec/tbody_spec.rb +0 -97
  80. data/spec/watirspec/tbodys_spec.rb +0 -65
  81. data/spec/watirspec/td_spec.rb +0 -72
  82. data/spec/watirspec/tds_spec.rb +0 -60
  83. data/spec/watirspec/text_field_spec.rb +0 -283
  84. data/spec/watirspec/text_fields_spec.rb +0 -49
  85. data/spec/watirspec/tfoot_spec.rb +0 -92
  86. data/spec/watirspec/tfoots_spec.rb +0 -71
  87. data/spec/watirspec/thead_spec.rb +0 -92
  88. data/spec/watirspec/theads_spec.rb +0 -71
  89. data/spec/watirspec/tr_spec.rb +0 -88
  90. data/spec/watirspec/trs_spec.rb +0 -68
  91. data/spec/watirspec/ul_spec.rb +0 -80
  92. data/spec/watirspec/uls_spec.rb +0 -44
  93. data/spec/watirspec/window_switching_spec.rb +0 -164
@@ -1,116 +0,0 @@
1
- # encoding: utf-8
2
- require File.expand_path("../spec_helper", __FILE__)
3
-
4
- describe "Pre" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/non_control_elements.html")
8
- end
9
-
10
- # Exists method
11
- describe "#exist?" do
12
- it "returns true if the 'p' exists" do
13
- browser.pre(:id, "rspec").should exist
14
- browser.pre(:id, /rspec/).should exist
15
- browser.pre(:text, 'browser.pre(:id, "rspec").should exist').should exist
16
- browser.pre(:text, /browser\.pre/).should exist
17
- browser.pre(:class, "ruby").should exist
18
- browser.pre(:class, /ruby/).should exist
19
- browser.pre(:index, 0).should exist
20
- browser.pre(:xpath, "//pre[@id='rspec']").should exist
21
- end
22
-
23
- it "returns the first pre if given no args" do
24
- browser.pre.should exist
25
- end
26
-
27
- it "returns false if the 'p' doesn't exist" do
28
- browser.pre(:id, "no_such_id").should_not exist
29
- browser.pre(:id, /no_such_id/).should_not exist
30
- browser.pre(:text, "no_such_text").should_not exist
31
- browser.pre(:text, /no_such_text/).should_not exist
32
- browser.pre(:class, "no_such_class").should_not exist
33
- browser.pre(:class, /no_such_class/).should_not exist
34
- browser.pre(:index, 1337).should_not exist
35
- browser.pre(:xpath, "//pre[@id='no_such_id']").should_not exist
36
- end
37
-
38
- it "raises TypeError when 'what' argument is invalid" do
39
- lambda { browser.pre(:id, 3.14).exists? }.should raise_error(TypeError)
40
- end
41
-
42
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
43
- lambda { browser.pre(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
44
- end
45
- end
46
-
47
- # Attribute methods
48
- describe "#class_name" do
49
- it "returns the class attribute" do
50
- browser.pre(:id, 'rspec').class_name.should == 'ruby'
51
- end
52
-
53
- it "returns an empty string if the element exists and the attribute doesn't" do
54
- browser.pre(:index, 0).class_name.should == ''
55
- end
56
-
57
- it "raises UnknownObjectException if the p doesn't exist" do
58
- lambda { browser.pre(:id, 'no_such_id').class_name }.should raise_error(UnknownObjectException)
59
- end
60
- end
61
-
62
- describe "#id" do
63
- it "returns the id attribute" do
64
- browser.pre(:class, 'ruby').id.should == "rspec"
65
- end
66
-
67
- it "returns an empty string if the element exists and the attribute doesn't" do
68
- browser.pre(:index, 0).id.should == ''
69
- end
70
-
71
- it "raises UnknownObjectException if the pre doesn't exist" do
72
- lambda { browser.pre(:id, "no_such_id").id }.should raise_error(UnknownObjectException)
73
- lambda { browser.pre(:index, 1337).id }.should raise_error(UnknownObjectException)
74
- end
75
- end
76
-
77
- describe "#title" do
78
- it "returns the title attribute" do
79
- browser.pre(:class, 'brainfuck').title.should == 'The brainfuck language is an esoteric programming language noted for its extreme minimalism'
80
- end
81
-
82
- it "returns an empty string if the element exists and the attribute doesn't" do
83
- browser.pre(:index, 0).title.should == ''
84
- end
85
-
86
- it "raises UnknownObjectException if the pre doesn't exist" do
87
- lambda { browser.pre(:id, 'no_such_id').title }.should raise_error( UnknownObjectException)
88
- lambda { browser.pre(:xpath, "//pre[@id='no_such_id']").title }.should raise_error( UnknownObjectException)
89
- end
90
- end
91
-
92
- describe "#text" do
93
- it "returns the text of the pre" do
94
- browser.pre(:class, 'haskell').text.should == 'main = putStrLn "Hello World"'
95
- end
96
-
97
- it "returns an empty string if the element doesn't contain any text" do
98
- browser.pre(:index, 0).text.should == ''
99
- end
100
-
101
- it "raises UnknownObjectException if the pre doesn't exist" do
102
- lambda { browser.pre(:id, 'no_such_id').text }.should raise_error( UnknownObjectException)
103
- lambda { browser.pre(:xpath , "//pre[@id='no_such_id']").text }.should raise_error( UnknownObjectException)
104
- end
105
- end
106
-
107
- describe "#respond_to?" do
108
- it "returns true for all attribute methods" do
109
- browser.image(:index, 0).should respond_to(:class_name)
110
- browser.image(:index, 0).should respond_to(:id)
111
- browser.image(:index, 0).should respond_to(:title)
112
- browser.image(:index, 0).should respond_to(:text)
113
- end
114
- end
115
-
116
- end
@@ -1,45 +0,0 @@
1
- # encoding: utf-8
2
- require File.expand_path("../spec_helper", __FILE__)
3
-
4
- describe "Pres" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/non_control_elements.html")
8
- end
9
-
10
- bug "http://github.com/jarib/celerity/issues#issue/25", :celerity do
11
- describe "with selectors" do
12
- it "returns the matching elements" do
13
- browser.pres(:class => "c++").to_a.should == [browser.pre(:class => "c++")]
14
- end
15
- end
16
- end
17
-
18
- describe "#length" do
19
- it "returns the number of pres" do
20
- browser.pres.length.should == 7
21
- end
22
- end
23
-
24
- describe "#[]" do
25
- it "returns the pre at the given index" do
26
- browser.pres[1].id.should == "rspec"
27
- end
28
- end
29
-
30
- describe "#each" do
31
- it "iterates through pres correctly" do
32
- count = 0
33
-
34
- browser.pres.each_with_index do |p, index|
35
- p.id.should == browser.pre(:index, index).id
36
- p.value.should == browser.pre(:index, index).value
37
-
38
- count += 1
39
- end
40
-
41
- count.should > 0
42
- end
43
- end
44
-
45
- end
@@ -1,45 +0,0 @@
1
- # encoding: utf-8
2
- require File.expand_path("../spec_helper", __FILE__)
3
-
4
- describe "Ps" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/non_control_elements.html")
8
- end
9
-
10
- bug "http://github.com/jarib/celerity/issues#issue/25", :celerity do
11
- describe "with selectors" do
12
- it "returns the matching elements" do
13
- browser.ps(:class => "lead").to_a.should == [browser.p(:class => "lead")]
14
- end
15
- end
16
- end
17
-
18
- describe "#length" do
19
- it "returns the number of ps" do
20
- browser.ps.length.should == 5
21
- end
22
- end
23
-
24
- describe "#[]" do
25
- it "returns the p at the given index" do
26
- browser.ps[0].id.should == "lead"
27
- end
28
- end
29
-
30
- describe "#each" do
31
- it "iterates through ps correctly" do
32
- count = 0
33
-
34
- browser.ps.each_with_index do |p, index|
35
- p.id.should == browser.p(:index, index).id
36
- p.value.should == browser.p(:index, index).value
37
-
38
- count += 1
39
- end
40
-
41
- count.should > 0
42
- end
43
- end
44
-
45
- end
@@ -1,262 +0,0 @@
1
- # encoding: utf-8
2
- require File.expand_path("../spec_helper", __FILE__)
3
-
4
- describe "Radio" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
8
- end
9
-
10
- # Exists method
11
- describe "#exists?" do
12
- it "returns true if the radio button exists" do
13
- browser.radio(:id, "new_user_newsletter_yes").should exist
14
- browser.radio(:id, /new_user_newsletter_yes/).should exist
15
- browser.radio(:name, "new_user_newsletter").should exist
16
- browser.radio(:name, /new_user_newsletter/).should exist
17
- browser.radio(:value, "yes").should exist
18
- browser.radio(:value, /yes/).should exist
19
- # TODO: figure out what :text means for a radio button
20
- # browser.radio(:text, "yes").should exist
21
- # browser.radio(:text, /yes/).should exist
22
- browser.radio(:class, "huge").should exist
23
- browser.radio(:class, /huge/).should exist
24
- browser.radio(:index, 0).should exist
25
- browser.radio(:xpath, "//input[@id='new_user_newsletter_yes']").should exist
26
- end
27
-
28
- it "returns the first radio if given no args" do
29
- browser.radio.should exist
30
- end
31
-
32
- it "returns true if the radio button exists (search by name and value)" do
33
- browser.radio(:name => "new_user_newsletter", :value => 'yes').should exist
34
- browser.radio(:xpath, "//input[@name='new_user_newsletter' and @value='yes']").set
35
- end
36
-
37
- it "returns false if the radio button does not exist" do
38
- browser.radio(:id, "no_such_id").should_not exist
39
- browser.radio(:id, /no_such_id/).should_not exist
40
- browser.radio(:name, "no_such_name").should_not exist
41
- browser.radio(:name, /no_such_name/).should_not exist
42
- browser.radio(:value, "no_such_value").should_not exist
43
- browser.radio(:value, /no_such_value/).should_not exist
44
- browser.radio(:text, "no_such_text").should_not exist
45
- browser.radio(:text, /no_such_text/).should_not exist
46
- browser.radio(:class, "no_such_class").should_not exist
47
- browser.radio(:class, /no_such_class/).should_not exist
48
- browser.radio(:index, 1337).should_not exist
49
- browser.radio(:xpath, "input[@id='no_such_id']").should_not exist
50
- end
51
-
52
- it "returns false if the radio button does not exist (search by name and value)" do
53
- browser.radio(:name => "new_user_newsletter", :value => 'no_such_value').should_not exist
54
- browser.radio(:xpath, "//input[@name='new_user_newsletter' and @value='no_such_value']").should_not exist
55
- browser.radio(:name => "no_such_name", :value => 'yes').should_not exist
56
- browser.radio(:xpath, "//input[@name='no_such_name' and @value='yes']").should_not exist
57
- end
58
-
59
- it "returns true for radios with a string value" do
60
- browser.radio(:name => 'new_user_newsletter', :value => 'yes').should exist
61
- browser.radio(:name => 'new_user_newsletter', :value => 'no').should exist
62
- end
63
-
64
- it "raises TypeError when 'what' argument is invalid" do
65
- lambda { browser.radio(:id, 3.14).exists? }.should raise_error(TypeError)
66
- end
67
-
68
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
69
- lambda { browser.radio(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
70
- end
71
- end
72
-
73
- # Attribute methods
74
- describe "#class_name" do
75
- it "returns the class name if the radio exists and has an attribute" do
76
- browser.radio(:id, "new_user_newsletter_yes").class_name.should == "huge"
77
- end
78
-
79
- it "returns an emptry string if the radio exists and the attribute doesn't" do
80
- browser.radio(:id, "new_user_newsletter_no").class_name.should == ""
81
- end
82
-
83
- it "raises UnknownObjectException if the radio doesn't exist" do
84
- lambda { browser.radio(:id, "no_such_id").class_name }.should raise_error(UnknownObjectException)
85
- end
86
- end
87
-
88
- describe "#id" do
89
- it "returns the id attribute if the radio exists and has an attribute" do
90
- browser.radio(:index, 0).id.should == "new_user_newsletter_yes"
91
- end
92
-
93
- it "returns an emptry string if the radio exists and the attribute doesn't" do
94
- browser.radio(:index, 2).id.should == ""
95
- end
96
-
97
- it "raises UnknownObjectException if the radio doesn't exist" do
98
- lambda { browser.radio(:index, 1337).id }.should raise_error(UnknownObjectException)
99
- end
100
- end
101
-
102
- describe "#name" do
103
- it "returns the name attribute if the radio exists" do
104
- browser.radio(:id, 'new_user_newsletter_yes').name.should == "new_user_newsletter"
105
- end
106
-
107
- it "returns an empty string if the radio exists and the attribute doesn't" do
108
- browser.radio(:id, 'new_user_newsletter_absolutely').name.should == ""
109
- end
110
-
111
- it "raises UnknownObjectException if the radio doesn't exist" do
112
- lambda { browser.radio(:index, 1337).name }.should raise_error(UnknownObjectException)
113
- end
114
- end
115
-
116
- describe "#title" do
117
- it "returns the title attribute if the radio exists" do
118
- browser.radio(:id, "new_user_newsletter_no").title.should == "Traitor!"
119
- end
120
-
121
- it "returns an emptry string if the radio exists and the attribute doesn't" do
122
- browser.radio(:id, "new_user_newsletter_yes").title.should == ""
123
- end
124
-
125
- it "raises UnknownObjectException if the radio doesn't exist" do
126
- lambda { browser.radio(:index, 1337).title }.should raise_error(UnknownObjectException)
127
- end
128
- end
129
-
130
- describe "#type" do
131
- it "returns the type attribute if the radio exists" do
132
- browser.radio(:index, 0).type.should == "radio"
133
- end
134
-
135
- it "raises UnknownObjectException if the radio doesn't exist" do
136
- lambda { browser.radio(:index, 1337).type }.should raise_error(UnknownObjectException)
137
- end
138
- end
139
-
140
- describe "#value" do
141
- it "returns the value attribute if the radio exists" do
142
- browser.radio(:id, 'new_user_newsletter_yes').value.should == 'yes'
143
- end
144
-
145
- it "raises UnknownObjectException if the radio doesn't exist" do
146
- lambda { browser.radio(:index, 1337).value}.should raise_error(UnknownObjectException)
147
- end
148
- end
149
-
150
- describe "#respond_to?" do
151
- it "returns true for all attribute methods" do
152
- browser.radio(:index, 0).should respond_to(:class_name)
153
- browser.radio(:index, 0).should respond_to(:id)
154
- browser.radio(:index, 0).should respond_to(:name)
155
- browser.radio(:index, 0).should respond_to(:title)
156
- browser.radio(:index, 0).should respond_to(:type)
157
- browser.radio(:index, 0).should respond_to(:value)
158
- end
159
- end
160
-
161
- # Access methods
162
- describe "#enabled?" do
163
- it "returns true if the radio button is enabled" do
164
- browser.radio(:id, "new_user_newsletter_yes").should be_enabled
165
- browser.radio(:xpath, "//input[@id='new_user_newsletter_yes']").should be_enabled
166
- end
167
-
168
- it "returns false if the radio button is disabled" do
169
- browser.radio(:id, "new_user_newsletter_nah").should_not be_enabled
170
- browser.radio(:xpath, "//input[@id='new_user_newsletter_nah']").should_not be_enabled
171
- end
172
-
173
- it "raises UnknownObjectException if the radio button doesn't exist" do
174
- lambda { browser.radio(:id, "no_such_id").enabled? }.should raise_error(UnknownObjectException)
175
- lambda { browser.radio(:xpath, "//input[@id='no_such_id']").enabled? }.should raise_error(UnknownObjectException)
176
- end
177
- end
178
-
179
- describe "#disabled?" do
180
- it "returns true if the radio is disabled" do
181
- browser.radio(:id, 'new_user_newsletter_nah').should be_disabled
182
- end
183
-
184
- it "returns false if the radio is enabled" do
185
- browser.radio(:id, 'new_user_newsletter_yes').should_not be_disabled
186
- end
187
-
188
- it "raises UnknownObjectException if the radio doesn't exist" do
189
- lambda { browser.radio(:index, 1337).disabled? }.should raise_error(UnknownObjectException)
190
- end
191
- end
192
-
193
- describe "#set" do
194
- it "sets the radio button" do
195
- browser.radio(:id, "new_user_newsletter_no").set
196
- browser.radio(:id, "new_user_newsletter_no").should be_set
197
- end
198
-
199
- it "sets the radio button when found by :xpath" do
200
- browser.radio(:xpath, "//input[@id='new_user_newsletter_no']").set
201
- browser.radio(:xpath, "//input[@id='new_user_newsletter_no']").should be_set
202
- end
203
-
204
- bug "http://code.google.com/p/selenium/issues/detail?id=695", [:webdriver, :ie] do
205
- it "fires the onclick event" do
206
- browser.radio(:id, "new_user_newsletter_no").set
207
- browser.radio(:id, "new_user_newsletter_yes").set
208
- messages.should == ["clicked: new_user_newsletter_no", "clicked: new_user_newsletter_yes"]
209
- end
210
- end
211
-
212
- # http://webbugtrack.blogspot.com/2007/11/bug-193-onchange-does-not-fire-properly.html
213
- not_compliant_on [:webdriver, :ie] do
214
- it "fires the onchange event" do
215
- browser.radio(:value, 'certainly').set
216
- messages.should == ["changed: new_user_newsletter"]
217
-
218
- browser.radio(:value, 'certainly').set
219
- messages.should == ["changed: new_user_newsletter"] # no event fired here - didn't change
220
-
221
- browser.radio(:value, 'yes').set
222
- browser.radio(:value, 'certainly').set
223
- messages.should == ["changed: new_user_newsletter", "clicked: new_user_newsletter_yes", "changed: new_user_newsletter"]
224
- end
225
- end
226
-
227
- it "raises UnknownObjectException if the radio button doesn't exist" do
228
- lambda { browser.radio(:name, "no_such_name").set }.should raise_error(UnknownObjectException)
229
- lambda { browser.radio(:xpath, "//input[@name='no_such_name']").set }.should raise_error(UnknownObjectException)
230
- end
231
-
232
- it "raises ObjectDisabledException if the radio is disabled" do
233
- lambda { browser.radio(:id, "new_user_newsletter_nah").set }.should raise_error(ObjectDisabledException)
234
- lambda { browser.radio(:xpath, "//input[@id='new_user_newsletter_nah']").set }.should raise_error(ObjectDisabledException )
235
- end
236
- end
237
-
238
- # Other
239
- describe '#set?' do
240
- it "returns true if the radio button is set" do
241
- browser.radio(:id, "new_user_newsletter_yes").should be_set
242
- end
243
-
244
- it "returns false if the radio button unset" do
245
- browser.radio(:id, "new_user_newsletter_no").should_not be_set
246
- end
247
-
248
- it "returns the state for radios with string values" do
249
- browser.radio(:name => "new_user_newsletter", :value => 'no').should_not be_set
250
- browser.radio(:name => "new_user_newsletter", :value => 'no').set
251
- browser.radio(:name => "new_user_newsletter", :value => 'no').should be_set
252
- browser.radio(:name => "new_user_newsletter", :value => 'yes').set
253
- browser.radio(:name => "new_user_newsletter", :value => 'no').should_not be_set
254
- end
255
-
256
- it "raises UnknownObjectException if the radio button doesn't exist" do
257
- lambda { browser.radio(:id, "no_such_id").set? }.should raise_error(UnknownObjectException)
258
- lambda { browser.radio(:xpath, "//input[@id='no_such_id']").set? }.should raise_error(UnknownObjectException)
259
- end
260
- end
261
-
262
- end