commonwatir 3.0.0.rc2 → 3.0.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,22 @@
1
+ == 3.0.0.rc3 - 2012/03/18
2
+
3
+ * all html elements are now supported (even html5 ones)
4
+ * CookieManager removed
5
+ * cookies API support added (https://github.com/watir/watirspec/blob/master/cookies_spec.rb)
6
+ * drag and drop API support added (https://github.com/watir/watirspec/blob/master/drag_and_drop_spec.rb)
7
+ * Element#(before|after)? removed
8
+ * Element#(before|after)_text removed
9
+ * Browser#cell(s) and Browser#row(s) removed
10
+ * Browser#Element camelCase methods removed, use under_score methods instead
11
+ * Browser#element(s) supports only general attributes like :id, :title, :class_name, :text, :html and such
12
+ * Browser#modal_dialog improved
13
+ * Browser#send_keys and Element#send_keys have now same syntax as specified in WatirSpec
14
+ * Element#style returns internal styles only for IE9, inline style will be returned for IE8
15
+ * Table#each removed - use Table#(trs|rows).each instead
16
+ * Table#row(s) and Table#cell(s) added which ignore inner tables - use #td/#tr for all.
17
+ * raise an Exception if more locators are specified with :xpath/:css
18
+ * searching by :xpath and :css code rewritten
19
+
1
20
  == 3.0.0.rc2 - 2012/02/04
2
21
 
3
22
  * Browser#textarea(s) method for searching <textarea> elements
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.0.rc2
1
+ 3.0.0.rc3
@@ -43,10 +43,8 @@ module Watir
43
43
  end
44
44
 
45
45
  # Return an error message for when unable to locate the element
46
- def self.message_for_unable_to_locate(how, what)
47
- result = "using #{how.inspect}"
48
- result << ", #{what.inspect}" if what
49
- "Unable to locate element, #{result}"
46
+ def self.message_for_unable_to_locate(specifiers)
47
+ "Unable to locate element, using #{specifiers.inspect}"
50
48
  end
51
49
  end
52
- end
50
+ end
@@ -20,7 +20,7 @@ class TimeKeeper
20
20
  @sleep_time += Kernel.sleep seconds
21
21
  end
22
22
  def now
23
- Time.now
23
+ ::Time.now
24
24
  end
25
25
  end
26
26
 
@@ -95,4 +95,4 @@ class Waiter
95
95
  end
96
96
  end
97
97
 
98
- end # module
98
+ end # module
@@ -13,7 +13,7 @@ class TC_Button < Test::Unit::TestCase
13
13
  def test_exceptions_on_methods
14
14
  assert_raises(UnknownObjectException) { browser.button(:name, "noName").id }
15
15
  assert_raises(UnknownObjectException) { browser.button(:name, "noName").name }
16
- assert_raises(UnknownObjectException) { browser.button(:name, "noName").disabled }
16
+ assert_raises(UnknownObjectException) { browser.button(:name, "noName").disabled? }
17
17
  assert_raises(UnknownObjectException) { browser.button(:name, "noName").type }
18
18
  assert_raises(UnknownObjectException) { browser.button(:name, "noName").value }
19
19
  end
@@ -37,7 +37,7 @@ class TC_Button < Test::Unit::TestCase
37
37
  assert_equal("b2", browser.button(:index, 1).id)
38
38
  assert_equal("button", browser.button(:index, 1).type)
39
39
  assert_equal("Click Me", browser.button(:index, 1).value)
40
- assert_equal(false, browser.button(:index, 1).disabled)
40
+ assert_equal(false, browser.button(:index, 1).disabled?)
41
41
  assert_equal("italic_button", browser.button(:name, "b1").class_name)
42
42
  assert_equal("", browser.button(:name , "b4").class_name)
43
43
 
@@ -49,7 +49,7 @@ class TC_Button < Test::Unit::TestCase
49
49
  assert_equal("b5", browser.button(:index, 2).id)
50
50
  assert_equal("button", browser.button(:index, 2).type)
51
51
  assert_equal("Disabled Button", browser.button(:index, 2).value)
52
- assert_equal(true, browser.button(:index, 2).disabled)
52
+ assert_equal(true, browser.button(:index, 2).disabled?)
53
53
 
54
54
  assert_equal("", browser.button(:index, 2).title)
55
55
  assert_equal("this is button1", browser.button(:index, 1).title)
@@ -61,7 +61,7 @@ class TC_Button < Test::Unit::TestCase
61
61
  assert_equal("b2", browser.button(:index, 0).id)
62
62
  assert_equal("button", browser.button(:index, 0).type)
63
63
  assert_equal("Click Me", browser.button(:index, 0).value)
64
- assert_equal(false, browser.button(:index, 0).disabled)
64
+ assert_equal(false, browser.button(:index, 0).disabled?)
65
65
  assert_equal("italic_button", browser.button(:name, "b1").class_name)
66
66
  assert_equal("", browser.button(:name , "b4").class_name)
67
67
 
@@ -73,7 +73,7 @@ class TC_Button < Test::Unit::TestCase
73
73
  assert_equal("b5", browser.button(:index, 1).id)
74
74
  assert_equal("button", browser.button(:index, 1).type)
75
75
  assert_equal("Disabled Button", browser.button(:index, 1).value)
76
- assert_equal(true, browser.button(:index, 1).disabled)
76
+ assert_equal(true, browser.button(:index, 1).disabled?)
77
77
 
78
78
  assert_equal("", browser.button(:index, 1).title)
79
79
  assert_equal("this is button1", browser.button(:index, 0).title)
@@ -131,7 +131,7 @@ class TC_Button2 < Test::Unit::TestCase
131
131
  assert_equal("b6", browser.button(:id, "b7").name)
132
132
  assert_equal("b7", browser.button(:name, "b6").id)
133
133
  assert_equal("Click Me2", browser.button(:id, "b7").value)
134
- assert_equal(false, browser.button(:id, "b7").disabled)
134
+ assert_equal(false, browser.button(:id, "b7").disabled?)
135
135
  assert_equal("italic_button", browser.button(:name, "b6").class_name )
136
136
 
137
137
  assert_equal("b8", browser.button(:id, "b9").name)
@@ -191,7 +191,7 @@ class TC_Button2 < Test::Unit::TestCase
191
191
  assert_equal("b1", arr_buttons[1].name)
192
192
  assert_equal("button", arr_buttons[1].type)
193
193
  assert_equal("Click Me", arr_buttons[1].value)
194
- assert_equal(false, arr_buttons[1].disabled)
194
+ assert_equal(false, arr_buttons[1].disabled?)
195
195
  assert_equal("italic_button", arr_buttons[1].class_name)
196
196
  assert_equal( "this is button1", arr_buttons[1].title)
197
197
 
@@ -199,7 +199,7 @@ class TC_Button2 < Test::Unit::TestCase
199
199
  assert_equal("b4", arr_buttons[2].name)
200
200
  assert_equal("button", arr_buttons[2].type)
201
201
  assert_equal("Disabled Button", arr_buttons[2].value)
202
- assert_equal(true, arr_buttons[2].disabled)
202
+ assert_equal(true, arr_buttons[2].disabled?)
203
203
  assert_equal( "", arr_buttons[2].title)
204
204
  assert_equal("", arr_buttons[2].class_name)
205
205
 
@@ -221,7 +221,7 @@ class TC_Button2 < Test::Unit::TestCase
221
221
  assert_equal("b1", arr_buttons[0].name)
222
222
  assert_equal("button", arr_buttons[0].type)
223
223
  assert_equal("Click Me", arr_buttons[0].value)
224
- assert_equal(false, arr_buttons[0].disabled)
224
+ assert_equal(false, arr_buttons[0].disabled?)
225
225
  assert_equal("italic_button", arr_buttons[0].class_name)
226
226
  assert_equal( "this is button1", arr_buttons[0].title)
227
227
 
@@ -229,7 +229,7 @@ class TC_Button2 < Test::Unit::TestCase
229
229
  assert_equal("b4", arr_buttons[1].name)
230
230
  assert_equal("button", arr_buttons[1].type)
231
231
  assert_equal("Disabled Button", arr_buttons[1].value)
232
- assert_equal(true, arr_buttons[1].disabled)
232
+ assert_equal(true, arr_buttons[1].disabled?)
233
233
  assert_equal( "", arr_buttons[1].title)
234
234
  assert_equal("", arr_buttons[1].class_name)
235
235
 
@@ -266,7 +266,7 @@ class TC_Button2 < Test::Unit::TestCase
266
266
  browser.button(:value => 'Click Me', :index => 2).name
267
267
  end
268
268
  # can't assume hash ordering
269
- assert_match(/Unable to locate element, using \{(:index=>2, :value=>"Click Me"|:value=>"Click Me", :index=>2)\}/, exception.message)
269
+ assert_match(/Unable to locate element, using \{.*(:index=>2, :value=>"Click Me"|:value=>"Click Me", :index=>2).*\}/, exception.message)
270
270
  end
271
271
  end
272
272
 
@@ -11,7 +11,7 @@ class TC_SelectLists < Test::Unit::TestCase
11
11
  def test_select_by_numeric
12
12
  # make sure we still find the right option if passed a number
13
13
  browser.select_list(:id, 'year').select(2011)
14
- assert_equal(['2011'], browser.select_list(:id, 'year').selected_options)
14
+ assert_equal(['2011'], browser.select_list(:id, 'year').selected_options.map(&:text))
15
15
  end
16
16
 
17
17
  end
metadata CHANGED
@@ -1,47 +1,34 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: commonwatir
3
- version: !ruby/object:Gem::Version
4
- hash: 15424113
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.0.rc3
5
5
  prerelease: 6
6
- segments:
7
- - 3
8
- - 0
9
- - 0
10
- - rc
11
- - 2
12
- version: 3.0.0.rc2
13
6
  platform: ruby
14
- authors:
7
+ authors:
15
8
  - Bret Pettichord
16
9
  autorequire:
17
10
  bindir: bin
18
11
  cert_chain: []
19
-
20
- date: 2012-02-04 00:00:00 Z
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
23
15
  name: user-choices
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2381184 !ruby/object:Gem::Requirement
26
17
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
34
22
  type: :runtime
35
- version_requirements: *id001
23
+ prerelease: false
24
+ version_requirements: *2381184
36
25
  description: Common library for Watir and FireWatir.
37
26
  email: bret@pettichord.com
38
27
  executables: []
39
-
40
28
  extensions: []
41
-
42
- extra_rdoc_files:
29
+ extra_rdoc_files:
43
30
  - README.rdoc
44
- files:
31
+ files:
45
32
  - lib/watir/assertions.rb
46
33
  - lib/watir/browser.rb
47
34
  - lib/watir/browsers.rb
@@ -88,7 +75,6 @@ files:
88
75
  - unittests/html/wait.html
89
76
  - unittests/html/watir_unit_tests.css
90
77
  - unittests/html/whitespace.html
91
- - unittests/inspect_test.rb
92
78
  - unittests/options.yml.example
93
79
  - unittests/select_list_test.rb
94
80
  - unittests/setup/browser.rb
@@ -106,41 +92,31 @@ files:
106
92
  - unittests/whitespace_test.rb
107
93
  homepage: http://www.watir.com
108
94
  licenses: []
109
-
110
95
  post_install_message:
111
- rdoc_options:
96
+ rdoc_options:
112
97
  - --main
113
98
  - README.rdoc
114
- require_paths:
99
+ require_paths:
115
100
  - lib
116
- required_ruby_version: !ruby/object:Gem::Requirement
101
+ required_ruby_version: !ruby/object:Gem::Requirement
117
102
  none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- hash: 3
122
- segments:
123
- - 0
124
- version: "0"
125
- required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ! '>='
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
108
  none: false
127
- requirements:
128
- - - ">"
129
- - !ruby/object:Gem::Version
130
- hash: 25
131
- segments:
132
- - 1
133
- - 3
134
- - 1
109
+ requirements:
110
+ - - ! '>'
111
+ - !ruby/object:Gem::Version
135
112
  version: 1.3.1
136
113
  requirements: []
137
-
138
114
  rubyforge_project: wtr
139
- rubygems_version: 1.8.4
115
+ rubygems_version: 1.8.12
140
116
  signing_key:
141
117
  specification_version: 3
142
118
  summary: Common library for Watir and FireWatir
143
- test_files:
119
+ test_files:
144
120
  - unittests/attach_to_existing_window_test.rb
145
121
  - unittests/browser_test.rb
146
122
  - unittests/buttons_test.rb
@@ -168,7 +144,6 @@ test_files:
168
144
  - unittests/html/wait.html
169
145
  - unittests/html/watir_unit_tests.css
170
146
  - unittests/html/whitespace.html
171
- - unittests/inspect_test.rb
172
147
  - unittests/options.yml.example
173
148
  - unittests/select_list_test.rb
174
149
  - unittests/setup/browser.rb
@@ -1,29 +0,0 @@
1
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
2
- require 'unittests/setup'
3
-
4
- class TC_Inspect < Test::Unit::TestCase
5
- location __FILE__
6
-
7
- def setup
8
- uses_page "emphasis.html"
9
- end
10
-
11
- def test_inspect_only_returns_url_and_title
12
- assert_match(%r{#<#{browser.class}:0x[0-9a-f.]+ url="file://.+/emphasis\.html" title="emphasis">}, browser.inspect)
13
- end
14
-
15
- def test_element_inspect
16
- assert_match(%r{^#<.+::Em:0x[0-9a-f.]+ located=false how=:id what=/em-one/>$}, browser.em(:id, /em-one/).inspect)
17
-
18
- located = browser.em(:id, "em-one")
19
- located.exists?
20
-
21
- assert_match(%r{^#<.+::Em:0x[0-9a-f.]+ located=true how=:id what="em-one">$}, located.inspect)
22
- end
23
-
24
- def test_element_collections_inspect
25
- assert_match(%r{#<.+::Ems:0x[0-9a-f.]+ length=3 container=.+>$}, browser.ems.inspect)
26
- end
27
-
28
- end
29
-