watir 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.
Files changed (68) hide show
  1. data/CHANGES +19 -0
  2. data/VERSION +1 -1
  3. data/lib/watir/close_all.rb +2 -2
  4. data/lib/watir/container.rb +6 -4
  5. data/lib/watir/cookies.rb +80 -0
  6. data/lib/watir/core.rb +7 -3
  7. data/lib/watir/dialogs/file_field.rb +0 -4
  8. data/lib/watir/drag_and_drop_helper.rb +68 -0
  9. data/lib/watir/element.rb +58 -156
  10. data/lib/watir/element_collection.rb +109 -0
  11. data/lib/watir/form.rb +7 -14
  12. data/lib/watir/frame.rb +11 -26
  13. data/lib/watir/ie-class.rb +17 -307
  14. data/lib/watir/ie.rb +0 -9
  15. data/lib/watir/image.rb +8 -25
  16. data/lib/watir/input_elements.rb +32 -81
  17. data/lib/watir/link.rb +2 -17
  18. data/lib/watir/locator.rb +29 -25
  19. data/lib/watir/modal_dialog.rb +26 -40
  20. data/lib/watir/non_control_elements.rb +111 -79
  21. data/lib/watir/page-container.rb +12 -1
  22. data/lib/watir/supported_elements.rb +172 -0
  23. data/lib/watir/table.rb +61 -89
  24. data/lib/watir/win32ole.rb +2 -3
  25. data/lib/watir/win32ole/1.9.3/win32ole.so +0 -0
  26. data/lib/watir/xpath_locator.rb +52 -0
  27. data/rakefile.rb +1 -1
  28. data/unittests/checkbox_test.rb +22 -32
  29. data/unittests/css_selector_test.rb +1 -6
  30. data/unittests/css_test.rb +1 -4
  31. data/unittests/div_test.rb +3 -21
  32. data/unittests/document_standards.rb +0 -4
  33. data/unittests/element_collections_test.rb +2 -2
  34. data/unittests/element_test.rb +1 -1
  35. data/unittests/form_test.rb +0 -30
  36. data/unittests/frame_test.rb +8 -49
  37. data/unittests/ie_test.rb +5 -9
  38. data/unittests/images_test.rb +6 -6
  39. data/unittests/index_specifier_test.rb +0 -1
  40. data/unittests/js_events_test.rb +1 -1
  41. data/unittests/links_multi_test.rb +0 -14
  42. data/unittests/links_test.rb +8 -51
  43. data/unittests/lists_test.rb +0 -9
  44. data/unittests/navigate_test.rb +1 -1
  45. data/unittests/nbsp_xpath_test.rb +1 -1
  46. data/unittests/no_wait_test.rb +3 -3
  47. data/unittests/parent_child_test.rb +0 -17
  48. data/unittests/pre_test.rb +0 -3
  49. data/unittests/radios_test.rb +31 -42
  50. data/unittests/selectbox_test.rb +18 -21
  51. data/unittests/selectbox_xpath_test.rb +11 -26
  52. data/unittests/table_test.rb +14 -79
  53. data/unittests/textfields_test.rb +8 -47
  54. data/unittests/windows/attach_to_new_window_test.rb +0 -8
  55. data/unittests/windows/frame_links_test.rb +5 -5
  56. data/unittests/windows/ie-each_test.rb +1 -1
  57. data/unittests/windows/modal_dialog_test.rb +2 -2
  58. data/watir.gemspec +3 -3
  59. metadata +81 -126
  60. data/lib/watir/camel_case.rb +0 -67
  61. data/lib/watir/collections.rb +0 -48
  62. data/lib/watir/cookiemanager.rb +0 -56
  63. data/lib/watir/element_collections.rb +0 -81
  64. data/lib/watir/html_element.rb +0 -30
  65. data/unittests/defer_test.rb +0 -47
  66. data/unittests/multiple_specifiers_test.rb +0 -29
  67. data/unittests/table_and_tablerow_to_a_test.rb +0 -117
  68. data/unittests/windows/iedialog_test.rb +0 -53
@@ -10,14 +10,14 @@ class TC_Frame_Links < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def test_click_in_a_frame
13
- browser.frame('linkFrame').link(:text, 'test1').click
14
- assert(browser.frame('linkFrame').text.include?('Links2-Pass'))
13
+ browser.frame(:name, 'linkFrame').link(:text, 'test1').click
14
+ assert(browser.frame(:name, 'linkFrame').text.include?('Links2-Pass'))
15
15
  end
16
16
 
17
17
  def test_click_no_wait_in_a_frame
18
- browser.frame('linkFrame').link(:text, 'test1').click_no_wait
19
- Wait.until(10){browser.frame('linkFrame').text.include?('Links2-Pass')}
20
- assert(browser.frame('linkFrame').text.include?('Links2-Pass'))
18
+ browser.frame(:name, 'linkFrame').link(:text, 'test1').click_no_wait
19
+ Watir::Wait.until(10){browser.frame(:name, 'linkFrame').text.include?('Links2-Pass')}
20
+ assert(browser.frame(:name, 'linkFrame').text.include?('Links2-Pass'))
21
21
  end
22
22
 
23
23
  end
@@ -41,6 +41,6 @@ class TC_IE_Each < Test::Unit::TestCase
41
41
 
42
42
  def teardown
43
43
  @ie.each {|ie| ie.close }
44
- Wait.until {Watir::IE.process_count == 0}
44
+ Watir::Wait.until {Watir::IE.process_count == 0}
45
45
  end
46
46
  end
@@ -25,7 +25,7 @@ class TC_ModalDialog < Watir::TestCase
25
25
 
26
26
  def test_modal_simple_use_case
27
27
  browser.button(:value, 'Launch Dialog').click_no_wait
28
- modal = browser.modal_dialog(:title, 'Modal Dialog')
28
+ modal = browser.modal_dialog
29
29
 
30
30
  assert(modal.text.include?('Enter some text:'))
31
31
  modal.text_field(:name, 'modal_text').set('hello')
@@ -35,7 +35,7 @@ class TC_ModalDialog < Watir::TestCase
35
35
 
36
36
  def test_wait_should_not_block
37
37
  browser.button(:value, 'Launch Dialog').click_no_wait
38
- modal = browser.modal_dialog(:title, 'Modal Dialog')
38
+ modal = browser.modal_dialog
39
39
 
40
40
  modal.text_field(:name, 'modal_text').set('hello')
41
41
  modal.wait
@@ -1,10 +1,10 @@
1
- require 'watir-rdoc'
1
+ require './watir-rdoc'
2
2
 
3
3
  $__watir_source_patterns = [
4
4
  'CHANGES', 'rakefile.rb', 'VERSION', "README.rdoc", 'watir.gemspec', 'watir-rdoc.rb', 'LICENSE',
5
5
  'lib/watir/*.rb', 'lib/watir/dialogs/*.rb', 'unittests/*.rb', 'unittests/html/*.html', 'unittests/html/images/*.*',
6
6
  'unittests/other/*.rb', 'unittests/testcase/*.rb', 'unittests/windows/*.rb',
7
- 'lib/watir/IEDialog/Release/IEDialog.dll', 'lib/watir/win32ole/1.8.7/win32ole.so',
7
+ 'lib/watir/IEDialog/Release/IEDialog.dll', 'lib/watir/win32ole/1.8.7/win32ole.so','lib/watir/win32ole/1.9.3/win32ole.so',
8
8
  'lib/watir/contrib/*.rb'] +
9
9
  $WATIR_EXTRA_RDOC_FILES
10
10
 
@@ -39,7 +39,7 @@ spec = Gem::Specification.new do |s|
39
39
  s.add_dependency 'commonwatir', '= ' + version
40
40
  s.add_dependency 'nokogiri'
41
41
  s.add_dependency 'ffi', '~>1.0'
42
- s.add_dependency 'rautomation', '~>0.6.3'
42
+ s.add_dependency 'rautomation', '~>0.7.2'
43
43
 
44
44
  s.rdoc_options += $WATIR_RDOC_OPTIONS
45
45
  s.extra_rdoc_files = $WATIR_EXTRA_RDOC_FILES
metadata CHANGED
@@ -1,128 +1,97 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: watir
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: win32-process
24
- prerelease: false
25
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &19223712 !ruby/object:Gem::Requirement
26
17
  none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 1
31
- segments:
32
- - 0
33
- - 5
34
- - 5
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
35
21
  version: 0.5.5
36
22
  type: :runtime
37
- version_requirements: *id001
38
- - !ruby/object:Gem::Dependency
39
- name: windows-pr
40
23
  prerelease: false
41
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *19223712
25
+ - !ruby/object:Gem::Dependency
26
+ name: windows-pr
27
+ requirement: &19223376 !ruby/object:Gem::Requirement
42
28
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- hash: 11
47
- segments:
48
- - 0
49
- - 6
50
- - 6
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
51
32
  version: 0.6.6
52
33
  type: :runtime
53
- version_requirements: *id002
54
- - !ruby/object:Gem::Dependency
55
- name: commonwatir
56
34
  prerelease: false
57
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *19223376
36
+ - !ruby/object:Gem::Dependency
37
+ name: commonwatir
38
+ requirement: &19222968 !ruby/object:Gem::Requirement
58
39
  none: false
59
- requirements:
60
- - - "="
61
- - !ruby/object:Gem::Version
62
- hash: 15424113
63
- segments:
64
- - 3
65
- - 0
66
- - 0
67
- - rc
68
- - 2
69
- version: 3.0.0.rc2
40
+ requirements:
41
+ - - =
42
+ - !ruby/object:Gem::Version
43
+ version: 3.0.0.rc3
70
44
  type: :runtime
71
- version_requirements: *id003
72
- - !ruby/object:Gem::Dependency
73
- name: nokogiri
74
45
  prerelease: false
75
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *19222968
47
+ - !ruby/object:Gem::Dependency
48
+ name: nokogiri
49
+ requirement: &19222680 !ruby/object:Gem::Requirement
76
50
  none: false
77
- requirements:
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- hash: 3
81
- segments:
82
- - 0
83
- version: "0"
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
84
55
  type: :runtime
85
- version_requirements: *id004
86
- - !ruby/object:Gem::Dependency
87
- name: ffi
88
56
  prerelease: false
89
- requirement: &id005 !ruby/object:Gem::Requirement
57
+ version_requirements: *19222680
58
+ - !ruby/object:Gem::Dependency
59
+ name: ffi
60
+ requirement: &19222164 !ruby/object:Gem::Requirement
90
61
  none: false
91
- requirements:
62
+ requirements:
92
63
  - - ~>
93
- - !ruby/object:Gem::Version
94
- hash: 15
95
- segments:
96
- - 1
97
- - 0
98
- version: "1.0"
64
+ - !ruby/object:Gem::Version
65
+ version: '1.0'
99
66
  type: :runtime
100
- version_requirements: *id005
101
- - !ruby/object:Gem::Dependency
102
- name: rautomation
103
67
  prerelease: false
104
- requirement: &id006 !ruby/object:Gem::Requirement
68
+ version_requirements: *19222164
69
+ - !ruby/object:Gem::Dependency
70
+ name: rautomation
71
+ requirement: &19221684 !ruby/object:Gem::Requirement
105
72
  none: false
106
- requirements:
73
+ requirements:
107
74
  - - ~>
108
- - !ruby/object:Gem::Version
109
- hash: 1
110
- segments:
111
- - 0
112
- - 6
113
- - 3
114
- version: 0.6.3
75
+ - !ruby/object:Gem::Version
76
+ version: 0.7.2
115
77
  type: :runtime
116
- version_requirements: *id006
117
- description: " WATIR is \"Web Application Testing in Ruby\". Watir (pronounced water) is a free,\n open-source functional testing tool for automating browser-based tests of web applications.\n It works with applications written in any language.\n Watir drives the Internet Explorer browser the same way an end user would.\n It clicks links, fills in forms, presses buttons.\n Watir also checks results, such as whether expected text appears on the\n page, or whether a control is enabled.\n Watir can test web applications written in any language.\n Watir is a Ruby library that works with Internet Explorer on Windows.\n"
78
+ prerelease: false
79
+ version_requirements: *19221684
80
+ description: ! " WATIR is \"Web Application Testing in Ruby\". Watir (pronounced
81
+ water) is a free,\n open-source functional testing tool for automating browser-based
82
+ tests of web applications.\n It works with applications written in any language.\n
83
+ \ Watir drives the Internet Explorer browser the same way an end user would.\n
84
+ \ It clicks links, fills in forms, presses buttons.\n Watir also checks results,
85
+ such as whether expected text appears on the\n page, or whether a control is
86
+ enabled.\n Watir can test web applications written in any language.\n Watir
87
+ is a Ruby library that works with Internet Explorer on Windows.\n"
118
88
  email: watir-general@groups.google.com
119
- executables:
89
+ executables:
120
90
  - watir-console
121
91
  extensions: []
122
-
123
- extra_rdoc_files:
92
+ extra_rdoc_files:
124
93
  - README.rdoc
125
- files:
94
+ files:
126
95
  - CHANGES
127
96
  - rakefile.rb
128
97
  - VERSION
@@ -130,17 +99,15 @@ files:
130
99
  - watir.gemspec
131
100
  - watir-rdoc.rb
132
101
  - LICENSE
133
- - lib/watir/camel_case.rb
134
102
  - lib/watir/close_all.rb
135
- - lib/watir/collections.rb
136
103
  - lib/watir/container.rb
137
- - lib/watir/cookiemanager.rb
104
+ - lib/watir/cookies.rb
138
105
  - lib/watir/core.rb
106
+ - lib/watir/drag_and_drop_helper.rb
139
107
  - lib/watir/element.rb
140
- - lib/watir/element_collections.rb
108
+ - lib/watir/element_collection.rb
141
109
  - lib/watir/form.rb
142
110
  - lib/watir/frame.rb
143
- - lib/watir/html_element.rb
144
111
  - lib/watir/ie-class.rb
145
112
  - lib/watir/ie-process.rb
146
113
  - lib/watir/ie.rb
@@ -156,10 +123,12 @@ files:
156
123
  - lib/watir/page-container.rb
157
124
  - lib/watir/process.rb
158
125
  - lib/watir/screen_capture.rb
126
+ - lib/watir/supported_elements.rb
159
127
  - lib/watir/table.rb
160
128
  - lib/watir/win32.rb
161
129
  - lib/watir/win32ole.rb
162
130
  - lib/watir/window.rb
131
+ - lib/watir/xpath_locator.rb
163
132
  - lib/watir/dialogs/file_field.rb
164
133
  - lib/watir/dialogs/javascript.rb
165
134
  - unittests/all_tests.rb
@@ -171,7 +140,6 @@ files:
171
140
  - unittests/core_tests.rb
172
141
  - unittests/css_selector_test.rb
173
142
  - unittests/css_test.rb
174
- - unittests/defer_test.rb
175
143
  - unittests/dialog_test.rb
176
144
  - unittests/div2_xpath_test.rb
177
145
  - unittests/div_test.rb
@@ -200,7 +168,6 @@ files:
200
168
  - unittests/lists_test.rb
201
169
  - unittests/map_test.rb
202
170
  - unittests/minmax_test.rb
203
- - unittests/multiple_specifiers_test.rb
204
171
  - unittests/navigate_test.rb
205
172
  - unittests/nbsp_xpath_test.rb
206
173
  - unittests/non_core_tests.rb
@@ -216,7 +183,6 @@ files:
216
183
  - unittests/selectbox_xpath_test.rb
217
184
  - unittests/setup.rb
218
185
  - unittests/speed_settings_test.rb
219
- - unittests/table_and_tablerow_to_a_test.rb
220
186
  - unittests/table_cell_using_xpath_test.rb
221
187
  - unittests/table_test.rb
222
188
  - unittests/table_xpath_test.rb
@@ -313,7 +279,6 @@ files:
313
279
  - unittests/windows/close_window_test.rb
314
280
  - unittests/windows/frame_links_test.rb
315
281
  - unittests/windows/ie-each_test.rb
316
- - unittests/windows/iedialog_test.rb
317
282
  - unittests/windows/modal_dialog_test.rb
318
283
  - unittests/windows/new_process_test.rb
319
284
  - unittests/windows/new_test.rb
@@ -321,15 +286,16 @@ files:
321
286
  - unittests/windows/send_keys_test.rb
322
287
  - lib/watir/IEDialog/Release/IEDialog.dll
323
288
  - lib/watir/win32ole/1.8.7/win32ole.so
289
+ - lib/watir/win32ole/1.9.3/win32ole.so
324
290
  - lib/watir/contrib/enabled_popup.rb
325
291
  - lib/watir/contrib/ie-new-process.rb
326
292
  - lib/watir/contrib/page_checker.rb
327
- - bin/watir-console
293
+ - !binary |-
294
+ YmluL3dhdGlyLWNvbnNvbGU=
328
295
  homepage: http://www.watir.com/
329
296
  licenses: []
330
-
331
297
  post_install_message:
332
- rdoc_options:
298
+ rdoc_options:
333
299
  - --title
334
300
  - Watir API Reference
335
301
  - --accessor
@@ -338,36 +304,25 @@ rdoc_options:
338
304
  - README.rdoc
339
305
  - --exclude
340
306
  - unittests|camel_case.rb
341
- require_paths:
307
+ require_paths:
342
308
  - lib
343
- required_ruby_version: !ruby/object:Gem::Requirement
309
+ required_ruby_version: !ruby/object:Gem::Requirement
344
310
  none: false
345
- requirements:
346
- - - ">="
347
- - !ruby/object:Gem::Version
348
- hash: 57
349
- segments:
350
- - 1
351
- - 8
352
- - 7
311
+ requirements:
312
+ - - ! '>='
313
+ - !ruby/object:Gem::Version
353
314
  version: 1.8.7
354
- required_rubygems_version: !ruby/object:Gem::Requirement
315
+ required_rubygems_version: !ruby/object:Gem::Requirement
355
316
  none: false
356
- requirements:
357
- - - ">"
358
- - !ruby/object:Gem::Version
359
- hash: 25
360
- segments:
361
- - 1
362
- - 3
363
- - 1
317
+ requirements:
318
+ - - ! '>'
319
+ - !ruby/object:Gem::Version
364
320
  version: 1.3.1
365
- requirements:
321
+ requirements:
366
322
  - Microsoft Windows running Internet Explorer 5.5 or later.
367
323
  rubyforge_project: Watir
368
- rubygems_version: 1.8.4
324
+ rubygems_version: 1.8.12
369
325
  signing_key:
370
326
  specification_version: 3
371
327
  summary: Automated testing tool for web applications.
372
328
  test_files: []
373
-
@@ -1,67 +0,0 @@
1
- # These are provided for backwards compatability with Watir 1.1
2
-
3
- module Watir
4
- module Container
5
- alias waitForIE wait
6
- alias fileField file_field
7
- alias textField text_field
8
- alias selectBox select_list
9
- alias checkBox checkbox
10
- end
11
- class IE
12
- alias getStatus status
13
- alias getDocument document
14
- alias pageContainsText contains_text
15
- alias waitForIE wait
16
- alias getHTML html
17
- alias getText text
18
- alias showFrames show_frames
19
- alias showForms show_forms
20
- alias showImages show_images
21
- alias showLinks show_links
22
- alias showActive show_active
23
- alias showAllObjects show_all_objects
24
- def getIE; @ie; end
25
-
26
- end
27
- class Element
28
- alias getOLEObject ole_object
29
- alias fireEvent fire_event
30
- alias innerText text
31
- alias afterText after_text
32
- alias beforeText before_text
33
- end
34
- class Frame
35
- alias getDocument document
36
- alias waitForIE wait
37
- end
38
- class Form
39
- alias waitForIE wait
40
- end
41
-
42
-
43
- class Image
44
- alias fileCreatedDate file_created_date
45
- alias fileSize file_size
46
- alias hasLoaded? loaded?
47
- end
48
-
49
- class RadioCheckCommon
50
- alias getState set?
51
- alias isSet? set?
52
- end
53
-
54
- class TextField
55
- alias readOnly? :readonly?
56
- alias getContents value
57
- alias maxLength maxlength
58
- alias dragContentsTo drag_contents_to
59
- end
60
-
61
- class SelectList
62
- alias getAllContents options
63
- alias getSelectedItems selected_options
64
- alias clearSelection clear
65
- alias includes? include?
66
- end
67
- end