watir-webdriver 0.0.1.dev5 → 0.0.1.dev6

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 (92) hide show
  1. data/Rakefile +13 -19
  2. data/VERSION +1 -1
  3. data/lib/watir-webdriver.rb +3 -1
  4. data/lib/watir-webdriver/base_element.rb +33 -27
  5. data/lib/watir-webdriver/browser.rb +2 -6
  6. data/lib/watir-webdriver/elements/font.rb +12 -0
  7. data/lib/watir-webdriver/elements/generated.rb +1027 -622
  8. data/lib/watir-webdriver/elements/select_list.rb +3 -3
  9. data/lib/watir-webdriver/locators/element_locator.rb +2 -2
  10. data/lib/watir-webdriver/xpath_support.rb +2 -2
  11. data/support/html5/html5.idl +942 -483
  12. data/support/html5/old/html5.idl +962 -0
  13. data/support/html5/{html5_extras.idl → old/html5_extras.idl} +0 -2
  14. data/support/html5/watir_visitor.rb +23 -19
  15. metadata +74 -100
  16. data/spec/watirspec/area_spec.rb +0 -78
  17. data/spec/watirspec/areas_spec.rb +0 -31
  18. data/spec/watirspec/browser_spec.rb +0 -274
  19. data/spec/watirspec/button_spec.rb +0 -242
  20. data/spec/watirspec/buttons_spec.rb +0 -48
  21. data/spec/watirspec/checkbox_spec.rb +0 -272
  22. data/spec/watirspec/checkboxes_spec.rb +0 -32
  23. data/spec/watirspec/dd_spec.rb +0 -123
  24. data/spec/watirspec/dds_spec.rb +0 -31
  25. data/spec/watirspec/div_spec.rb +0 -211
  26. data/spec/watirspec/divs_spec.rb +0 -31
  27. data/spec/watirspec/dl_spec.rb +0 -123
  28. data/spec/watirspec/dls_spec.rb +0 -32
  29. data/spec/watirspec/dt_spec.rb +0 -123
  30. data/spec/watirspec/dts_spec.rb +0 -31
  31. data/spec/watirspec/element_spec.rb +0 -89
  32. data/spec/watirspec/em_spec.rb +0 -97
  33. data/spec/watirspec/ems_spec.rb +0 -32
  34. data/spec/watirspec/filefield_spec.rb +0 -119
  35. data/spec/watirspec/filefields_spec.rb +0 -32
  36. data/spec/watirspec/form_spec.rb +0 -63
  37. data/spec/watirspec/forms_spec.rb +0 -33
  38. data/spec/watirspec/frame_spec.rb +0 -129
  39. data/spec/watirspec/frames_spec.rb +0 -62
  40. data/spec/watirspec/hidden_spec.rb +0 -102
  41. data/spec/watirspec/hiddens_spec.rb +0 -32
  42. data/spec/watirspec/hn_spec.rb +0 -93
  43. data/spec/watirspec/hns_spec.rb +0 -38
  44. data/spec/watirspec/image_spec.rb +0 -207
  45. data/spec/watirspec/images_spec.rb +0 -31
  46. data/spec/watirspec/label_spec.rb +0 -75
  47. data/spec/watirspec/labels_spec.rb +0 -31
  48. data/spec/watirspec/li_spec.rb +0 -112
  49. data/spec/watirspec/lib/guards.rb +0 -59
  50. data/spec/watirspec/lib/server.rb +0 -127
  51. data/spec/watirspec/lib/spec_helper.rb +0 -79
  52. data/spec/watirspec/lib/watirspec.rb +0 -72
  53. data/spec/watirspec/link_spec.rb +0 -168
  54. data/spec/watirspec/links_spec.rb +0 -35
  55. data/spec/watirspec/lis_spec.rb +0 -31
  56. data/spec/watirspec/map_spec.rb +0 -76
  57. data/spec/watirspec/maps_spec.rb +0 -32
  58. data/spec/watirspec/meta_spec.rb +0 -22
  59. data/spec/watirspec/metas_spec.rb +0 -30
  60. data/spec/watirspec/ol_spec.rb +0 -78
  61. data/spec/watirspec/ols_spec.rb +0 -31
  62. data/spec/watirspec/option_spec.rb +0 -173
  63. data/spec/watirspec/p_spec.rb +0 -128
  64. data/spec/watirspec/pre_spec.rb +0 -112
  65. data/spec/watirspec/pres_spec.rb +0 -31
  66. data/spec/watirspec/ps_spec.rb +0 -31
  67. data/spec/watirspec/radio_spec.rb +0 -255
  68. data/spec/watirspec/radios_spec.rb +0 -32
  69. data/spec/watirspec/select_list_spec.rb +0 -318
  70. data/spec/watirspec/select_lists_spec.rb +0 -35
  71. data/spec/watirspec/span_spec.rb +0 -142
  72. data/spec/watirspec/spans_spec.rb +0 -31
  73. data/spec/watirspec/spec_helper.rb +0 -17
  74. data/spec/watirspec/strong_spec.rb +0 -89
  75. data/spec/watirspec/strongs_spec.rb +0 -32
  76. data/spec/watirspec/table_bodies_spec.rb +0 -45
  77. data/spec/watirspec/table_body_spec.rb +0 -98
  78. data/spec/watirspec/table_cell_spec.rb +0 -68
  79. data/spec/watirspec/table_cells_spec.rb +0 -47
  80. data/spec/watirspec/table_footer_spec.rb +0 -85
  81. data/spec/watirspec/table_footers_spec.rb +0 -47
  82. data/spec/watirspec/table_header_spec.rb +0 -85
  83. data/spec/watirspec/table_headers_spec.rb +0 -45
  84. data/spec/watirspec/table_row_spec.rb +0 -87
  85. data/spec/watirspec/table_rows_spec.rb +0 -50
  86. data/spec/watirspec/table_spec.rb +0 -160
  87. data/spec/watirspec/tables_spec.rb +0 -33
  88. data/spec/watirspec/text_field_spec.rb +0 -276
  89. data/spec/watirspec/text_fields_spec.rb +0 -35
  90. data/spec/watirspec/ul_spec.rb +0 -76
  91. data/spec/watirspec/uls_spec.rb +0 -33
  92. data/support/html5/idl_extractor.rb +0 -73
@@ -1,35 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Links" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/non_control_elements.html")
8
- end
9
-
10
- describe "#length" do
11
- it "returns the number of links" do
12
- browser.links.length.should == 4
13
- end
14
- end
15
-
16
- describe "#[]" do
17
- it "returns the link at the given index" do
18
- browser.links[2].id.should == "link_3"
19
- end
20
-
21
- it "returns a Link object also when the index is out of bounds" do
22
- browser.links[2000].should_not be_nil
23
- end
24
- end
25
-
26
- describe "#each" do
27
- it "iterates through links correctly" do
28
- browser.links.each_with_index do |c, index|
29
- c.id.should == browser.link(:index, index).id
30
- c.value.should == browser.link(:index, index).value
31
- end
32
- end
33
- end
34
-
35
- end
@@ -1,31 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Lis" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/non_control_elements.html")
8
- end
9
-
10
- describe "#length" do
11
- it "returns the number of lis" do
12
- browser.lis.length.should == 18
13
- end
14
- end
15
-
16
- describe "#[]" do
17
- it "returns the li at the given index" do
18
- browser.lis[4].id.should == "non_link_1"
19
- end
20
- end
21
-
22
- describe "#each" do
23
- it "iterates through lis correctly" do
24
- browser.lis.each_with_index do |l, index|
25
- l.id.should == browser.li(:index, index).id
26
- l.value.should == browser.li(:index, index).value
27
- end
28
- end
29
- end
30
-
31
- end
@@ -1,76 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Map" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/images.html")
8
- end
9
-
10
- # Exists method
11
- describe "#exist?" do
12
- it "returns true if the 'map' exists" do
13
- browser.map(:id, "triangle_map").should exist
14
- browser.map(:id, /triangle_map/).should exist
15
- browser.map(:name, "triangle_map").should exist
16
- browser.map(:name, /triangle_map/).should exist
17
- browser.map(:index, 0).should exist
18
- browser.map(:xpath, "//map[@id='triangle_map']").should exist
19
- end
20
-
21
- it "returns false if the 'map' doesn't exist" do
22
- browser.map(:id, "no_such_id").should_not exist
23
- browser.map(:id, /no_such_id/).should_not exist
24
- browser.map(:name, "no_such_id").should_not exist
25
- browser.map(:name, /no_such_id/).should_not exist
26
- browser.map(:index, 1337).should_not exist
27
- browser.map(:xpath, "//map[@id='no_such_id']").should_not exist
28
- end
29
-
30
- it "raises TypeError when 'what' argument is invalid" do
31
- lambda { browser.map(:id, 3.14).exists? }.should raise_error(TypeError)
32
- end
33
-
34
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
35
- lambda { browser.map(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
36
- end
37
- end
38
-
39
- # Attribute methods
40
- describe "#id" do
41
- it "returns the id attribute" do
42
- browser.map(:index, 0).id.should == "triangle_map"
43
- end
44
-
45
- it "returns an empty string if the element exists and the attribute doesn't" do
46
- browser.map(:index, 1).id.should == ''
47
- end
48
-
49
- it "raises UnknownObjectException if the p doesn't exist" do
50
- lambda { browser.map(:id, "no_such_id").id }.should raise_error(UnknownObjectException)
51
- lambda { browser.map(:index, 1337).id }.should raise_error(UnknownObjectException)
52
- end
53
- end
54
-
55
- describe "#name" do
56
- it "returns the name attribute" do
57
- browser.map(:index, 0).name.should == "triangle_map"
58
- end
59
-
60
- it "returns an empty string if the element exists and the attribute doesn't" do
61
- browser.map(:index, 1).name.should == ''
62
- end
63
-
64
- it "raises UnknownObjectException if the map doesn't exist" do
65
- lambda { browser.map(:id, "no_such_id").name }.should raise_error(UnknownObjectException)
66
- lambda { browser.map(:index, 1337).name }.should raise_error(UnknownObjectException)
67
- end
68
- end
69
-
70
- describe "#respond_to?" do
71
- it "returns true for all attribute methods" do
72
- browser.map(:index, 0).should respond_to(:id)
73
- browser.map(:index, 0).should respond_to(:name)
74
- end
75
- end
76
- end
@@ -1,32 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Maps" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/images.html")
8
- end
9
-
10
- describe "#length" do
11
- it "returns the number of maps" do
12
- browser.maps.length.should == 2
13
- end
14
- end
15
-
16
- describe "#[]" do
17
- it "returns the p at the given index" do
18
- browser.maps[0].id.should == "triangle_map"
19
- end
20
- end
21
-
22
- describe "#each" do
23
- it "iterates through maps correctly" do
24
- browser.maps.each_with_index do |m, index|
25
- m.name.should == browser.map(:index, index).name
26
- m.id.should == browser.map(:index, index).id
27
- m.value.should == browser.map(:index, index).value
28
- end
29
- end
30
- end
31
-
32
- end
@@ -1,22 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- bug "WTR-334", :watir do
5
- describe "Meta" do
6
- before :each do
7
- browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
8
- end
9
-
10
- describe "#exist?" do
11
- it "returns true if the meta tag exists" do
12
- browser.meta(:http_equiv, "Content-Type").should exist
13
- end
14
- end
15
-
16
- describe "content" do
17
- it "returns the content attribute of the tag" do
18
- browser.meta(:http_equiv, "Content-Type").content.should == "text/html; charset=utf-8"
19
- end
20
- end
21
- end
22
- end
@@ -1,30 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Metas" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
8
- end
9
-
10
- describe "#length" do
11
- it "returns the number of meta elements" do
12
- browser.metas.length.should == 2
13
- end
14
- end
15
-
16
- describe "#[]" do
17
- it "returns the meta element at the given index" do
18
- browser.metas[1].name.should == "description"
19
- end
20
- end
21
-
22
- describe "#each" do
23
- it "iterates through meta elements correctly" do
24
- browser.metas.each_with_index do |m, index|
25
- m.content.should == browser.meta(:index, index).content
26
- end
27
- end
28
- end
29
-
30
- end
@@ -1,78 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- bug "WTR-333", :watir do
5
- describe "Ol" do
6
-
7
- before :each do
8
- browser.goto(WatirSpec.files + "/non_control_elements.html")
9
- end
10
-
11
- # Exists method
12
- describe "#exist?" do
13
- it "returns true if the 'ol' exists" do
14
- browser.ol(:id, "favorite_compounds").should exist
15
- browser.ol(:id, /favorite_compounds/).should exist
16
- browser.ol(:index, 0).should exist
17
- browser.ol(:xpath, "//ol[@id='favorite_compounds']").should exist
18
- end
19
-
20
- it "returns false if the 'ol' doesn't exist" do
21
- browser.ol(:id, "no_such_id").should_not exist
22
- browser.ol(:id, /no_such_id/).should_not exist
23
- browser.ol(:text, "no_such_text").should_not exist
24
- browser.ol(:text, /no_such_text/).should_not exist
25
- browser.ol(:class, "no_such_class").should_not exist
26
- browser.ol(:class, /no_such_class/).should_not exist
27
- browser.ol(:index, 1337).should_not exist
28
- browser.ol(:xpath, "//ol[@id='no_such_id']").should_not exist
29
- end
30
-
31
- it "raises TypeError when 'what' argument is invalid" do
32
- lambda { browser.ol(:id, 3.14).exists? }.should raise_error(TypeError)
33
- end
34
-
35
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
36
- lambda { browser.ol(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
37
- end
38
- end
39
-
40
- # Attribute methods
41
- describe "#class_name" do
42
- it "returns the class attribute" do
43
- browser.ol(:id, 'favorite_compounds').class_name.should == 'chemistry'
44
- end
45
-
46
- it "returns an empty string if the element exists and the attribute doesn't" do
47
- browser.ol(:index, 1).class_name.should == ''
48
- end
49
-
50
- it "raises UnknownObjectException if the ol doesn't exist" do
51
- lambda { browser.ol(:id, 'no_such_id').class_name }.should raise_error(UnknownObjectException)
52
- end
53
- end
54
-
55
- describe "#id" do
56
- it "returns the id attribute" do
57
- browser.ol(:class, 'chemistry').id.should == "favorite_compounds"
58
- end
59
-
60
- it "returns an empty string if the element exists and the attribute doesn't" do
61
- browser.ol(:index, 1).id.should == ''
62
- end
63
-
64
- it "raises UnknownObjectException if the ol doesn't exist" do
65
- lambda { browser.ol(:id, "no_such_id").id }.should raise_error(UnknownObjectException)
66
- lambda { browser.ol(:index, 1337).id }.should raise_error(UnknownObjectException)
67
- end
68
- end
69
-
70
- describe "#respond_to?" do
71
- it "returns true for all attribute methods" do
72
- browser.ol(:index, 0).should respond_to(:class_name)
73
- browser.ol(:index, 0).should respond_to(:id)
74
- end
75
- end
76
-
77
- end
78
- end
@@ -1,31 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Ols" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/non_control_elements.html")
8
- end
9
-
10
- describe "#length" do
11
- it "returns the number of ols" do
12
- browser.ols.length.should == 2
13
- end
14
- end
15
-
16
- describe "#[]" do
17
- it "returns the ol at the given index" do
18
- browser.ols[0].id.should == "favorite_compounds"
19
- end
20
- end
21
-
22
- describe "#each" do
23
- it "iterates through ols correctly" do
24
- browser.ols.each_with_index do |ol, index|
25
- ol.id.should == browser.ol(:index, index).id
26
- ol.value.should == browser.ol(:index, index).value
27
- end
28
- end
29
- end
30
-
31
- end
@@ -1,173 +0,0 @@
1
- # encoding: utf-8
2
- require File.dirname(__FILE__) + '/spec_helper'
3
-
4
- describe "Option" do
5
-
6
- before :each do
7
- browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
8
- end
9
-
10
- describe "#exists?" do
11
- bug "WTR-367", :watir do
12
- it "returns true if the element exists (page context)" do
13
- bug "WTR-330", :watir do
14
- browser.option(:id, "nor").should exist
15
- browser.option(:id, /nor/).should exist
16
- end
17
- browser.option(:value, "2").should exist
18
- browser.option(:value, /2/).should exist
19
- browser.option(:text, "Norway").should exist
20
- browser.option(:text, /Norway/).should exist
21
- browser.option(:class, "scandinavia").should exist
22
- browser.option(:index, 1).should exist
23
- browser.option(:xpath, "//option[@id='nor']").should exist
24
- end
25
- end
26
-
27
- it "returns true if the element exists (select_list context)" do
28
- bug "WTR-330", :watir do
29
- browser.select_list(:name, "new_user_country").option(:id, "nor").should exist
30
- browser.select_list(:name, "new_user_country").option(:id, /nor/).should exist
31
- end
32
-
33
- browser.select_list(:name, "new_user_country").option(:value, "2").should exist
34
- browser.select_list(:name, "new_user_country").option(:value, /2/).should exist
35
- browser.select_list(:name, "new_user_country").option(:text, "Norway").should exist
36
- browser.select_list(:name, "new_user_country").option(:text, /Norway/).should exist
37
- browser.select_list(:name, "new_user_country").option(:class, "scandinavia").should exist
38
- browser.select_list(:name, "new_user_country").option(:index, 1).should exist
39
- browser.select_list(:name, "new_user_country").option(:xpath, "//option[@id='nor']").should exist
40
- browser.select_list(:name, "new_user_country").option(:xpath, "//option[@id='nor']").should exist
41
- browser.select_list(:name, "new_user_country").option(:label, "Germany").should exist
42
- end
43
-
44
- bug "WTR-367", :watir do
45
- it "returns false if the element does not exist (page context)" do
46
- bug "WTR-330", :watir do
47
- browser.option(:id, "no_such_id").should_not exist
48
- browser.option(:id, /no_such_id/).should_not exist
49
- end
50
- browser.option(:value, "no_such_value").should_not exist
51
- browser.option(:value, /no_such_value/).should_not exist
52
- browser.option(:text, "no_such_text").should_not exist
53
- browser.option(:text, /no_such_text/).should_not exist
54
- browser.option(:class, "no_such_class").should_not exist
55
- browser.option(:index, 1337).should_not exist
56
- browser.option(:xpath, "//option[@id='no_such_id']").should_not exist
57
- end
58
- end
59
-
60
- it "returns false if the element does not exist (select_list context)" do
61
- bug "WTR-330", :watir do
62
- browser.select_list(:name, "new_user_country").option(:id, "no_such_id").should_not exist
63
- browser.select_list(:name, "new_user_country").option(:id, /no_such_id/).should_not exist
64
- end
65
-
66
- browser.select_list(:name, "new_user_country").option(:value, "no_such_value").should_not exist
67
- browser.select_list(:name, "new_user_country").option(:value, /no_such_value/).should_not exist
68
- browser.select_list(:name, "new_user_country").option(:text, "no_such_text").should_not exist
69
- browser.select_list(:name, "new_user_country").option(:text, /no_such_text/).should_not exist
70
- browser.select_list(:name, "new_user_country").option(:class, "no_such_class").should_not exist
71
- browser.select_list(:name, "new_user_country").option(:index, 1337).should_not exist
72
- browser.select_list(:name, "new_user_country").option(:xpath, "//option[@id='no_such_id']").should_not exist
73
- end
74
-
75
- it "raises TypeError when 'what' argument is invalid" do
76
- bug "WTR-367", :watir do
77
- lambda { browser.option(:id, 3.14).exists? }.should raise_error(TypeError)
78
- end
79
-
80
- lambda { browser.select_list(:name, "new_user_country").option(:id, 3.14).exists? }.should raise_error(TypeError)
81
- end
82
-
83
- it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
84
- bug "WTR-367", :watir do
85
- lambda { browser.option(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
86
- end
87
- lambda { browser.select_list(:name, "new_user_country").option(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
88
- end
89
- end
90
-
91
- describe "#select" do
92
- bug "WTR-367", :watir do
93
- it "selects the chosen option (page context)" do
94
- browser.option(:text, "Denmark").select
95
- browser.select_list(:name, "new_user_country").selected_options.should == ["Denmark"]
96
- end
97
- end
98
-
99
- it "selects the chosen option (select_list context)" do
100
- browser.select_list(:name, "new_user_country").option(:text, "Denmark").select
101
- browser.select_list(:name, "new_user_country").selected_options.should == ["Denmark"]
102
- end
103
-
104
- bug "WTR-367, WTR-329", :watir do
105
- it "selects the option when found by text (page context)" do
106
- browser.option(:text, 'Sweden').select
107
- browser.option(:text, 'Sweden').should be_selected
108
- end
109
-
110
- it "selects the option when found by text (select_list context)" do
111
- browser.select_list(:name, 'new_user_country').option(:text, 'Sweden').select
112
- browser.select_list(:name, 'new_user_country').option(:text, 'Sweden').should be_selected
113
- end
114
- end
115
-
116
- it "fires the onclick event (page context)" do
117
- bug "WTR-367, WTR-335", :watir do
118
- browser.option(:text, "Username 3").select
119
- end
120
- browser.text_field(:id, 'delete_user_comment').value.should == 'Don\'t do it!'
121
- end
122
-
123
- it "fires onclick event (select_list context)" do
124
- browser.select_list(:id, 'delete_user_username').option(:text, "Username 3").select
125
- browser.text_field(:id, 'delete_user_comment').value.should == 'Don\'t do it!'
126
- end
127
-
128
- bug "WTR-367", :watir do
129
- it "raises UnknownObjectException if the option does not exist (page context)" do
130
- lambda { browser.option(:text, "no_such_text").select }.should raise_error(UnknownObjectException)
131
- lambda { browser.option(:text, /missing/).select }.should raise_error(UnknownObjectException)
132
- end
133
- end
134
-
135
- it "raises UnknownObjectException if the option does not exist (select_list context)" do
136
- lambda { browser.select_list(:name, "new_user_country").option(:text, "no_such_text").select }.should raise_error(UnknownObjectException)
137
- lambda { browser.select_list(:name, "new_user_country").option(:text, /missing/).select }.should raise_error(UnknownObjectException)
138
- end
139
-
140
- bug "WTR-367", :watir do
141
- it "raises MissingWayOfFindingObjectException when given a bad 'how' (page context)" do
142
- lambda { browser.option(:missing, "Denmark").select }.should raise_error(MissingWayOfFindingObjectException)
143
- end
144
- end
145
-
146
- it "raises MissingWayOfFindingObjectException when given a bad 'how' (select_list context)" do
147
- lambda { browser.select_list(:name, "new_user_country").option(:missing, "Denmark").select }.should raise_error(MissingWayOfFindingObjectException)
148
- end
149
- end
150
-
151
- bug "WTR-331", :watir do
152
- describe "#class_name" do
153
- bug "WTR-367", :watir do
154
- it "is able to get attributes (page context)" do
155
- browser.option(:text, 'Sweden').class_name.should == "scandinavia"
156
- end
157
- end
158
-
159
- it "is able to get attributes (select_list context)" do
160
- browser.select_list(:name, "new_user_country").option(:text , 'Sweden').class_name.should == "scandinavia"
161
- end
162
- end
163
- end
164
-
165
- describe "#respond_to?" do
166
- it "returns true for all attribute methods" do
167
- browser.select_list(:name, "new_user_country").option(:text, 'Sweden').should respond_to(:class_name)
168
- browser.select_list(:name, "new_user_country").option(:text, 'Sweden').should respond_to(:id)
169
- browser.select_list(:name, "new_user_country").option(:text, 'Sweden').should respond_to(:text)
170
- end
171
- end
172
-
173
- end