commonwatir 3.0.0.rc3 → 3.0.0

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 (64) hide show
  1. data/README +24 -0
  2. data/Rakefile +3 -14
  3. data/commonwatir.gemspec +18 -0
  4. data/lib/watir.rb +1 -14
  5. metadata +19 -131
  6. data/CHANGES +0 -712
  7. data/LICENSE +0 -34
  8. data/README.rdoc +0 -101
  9. data/VERSION +0 -1
  10. data/lib/watir/assertions.rb +0 -44
  11. data/lib/watir/browser.rb +0 -149
  12. data/lib/watir/browsers.rb +0 -13
  13. data/lib/watir/element_extensions.rb +0 -69
  14. data/lib/watir/exceptions.rb +0 -50
  15. data/lib/watir/matches.rb +0 -23
  16. data/lib/watir/options.rb +0 -56
  17. data/lib/watir/testcase.rb +0 -97
  18. data/lib/watir/util.rb +0 -35
  19. data/lib/watir/version.rb +0 -4
  20. data/lib/watir/wait.rb +0 -41
  21. data/lib/watir/wait_helper.rb +0 -12
  22. data/lib/watir/waiter.rb +0 -98
  23. data/unittests/attach_to_existing_window_test.rb +0 -70
  24. data/unittests/browser_test.rb +0 -38
  25. data/unittests/buttons_test.rb +0 -288
  26. data/unittests/dd_test.rb +0 -84
  27. data/unittests/dl_test.rb +0 -82
  28. data/unittests/dt_test.rb +0 -82
  29. data/unittests/element_collections_test.rb +0 -22
  30. data/unittests/element_test.rb +0 -24
  31. data/unittests/em_test.rb +0 -81
  32. data/unittests/form2_test.rb +0 -22
  33. data/unittests/html/blankpage.html +0 -11
  34. data/unittests/html/buttons1.html +0 -40
  35. data/unittests/html/buttons2.html +0 -60
  36. data/unittests/html/definition_lists.html +0 -48
  37. data/unittests/html/elements.html +0 -13
  38. data/unittests/html/emphasis.html +0 -12
  39. data/unittests/html/entertainment_com.html +0 -667
  40. data/unittests/html/frame_buttons.html +0 -4
  41. data/unittests/html/images/button.jpg +0 -0
  42. data/unittests/html/pass.html +0 -10
  43. data/unittests/html/phrase_elements.html +0 -15
  44. data/unittests/html/select_lists.html +0 -18
  45. data/unittests/html/utf8.html +0 -12
  46. data/unittests/html/visibility.html +0 -90
  47. data/unittests/html/wait.html +0 -15
  48. data/unittests/html/watir_unit_tests.css +0 -64
  49. data/unittests/html/whitespace.html +0 -29
  50. data/unittests/options.yml.example +0 -13
  51. data/unittests/select_list_test.rb +0 -19
  52. data/unittests/setup.rb +0 -17
  53. data/unittests/setup/browser.rb +0 -14
  54. data/unittests/setup/capture_io_helper.rb +0 -17
  55. data/unittests/setup/filter.rb +0 -24
  56. data/unittests/setup/lib.rb +0 -22
  57. data/unittests/setup/options.rb +0 -29
  58. data/unittests/setup/testUnitAddons.rb +0 -8
  59. data/unittests/setup/watir-unittest.rb +0 -78
  60. data/unittests/strong_test.rb +0 -46
  61. data/unittests/utf8_test.rb +0 -24
  62. data/unittests/visibility_test.rb +0 -47
  63. data/unittests/wait_test.rb +0 -126
  64. data/unittests/whitespace_test.rb +0 -46
@@ -1,4 +0,0 @@
1
- <frameset cols=50,50 >
2
- <frame src = buttons1.html name = buttonFrame>
3
- <frame src = blankpage.html name = buttonFrame2>
4
- </frameset>
@@ -1,10 +0,0 @@
1
- <html>
2
- <head>
3
- <title>
4
- Pass Page
5
- </title>
6
- </head>
7
- <body>
8
- PASS
9
- </body>
10
- </html>
@@ -1,15 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
- <html>
3
- <head>
4
- <title>Phrase elements</title>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
- </head>
7
-
8
-
9
- <body>
10
- <!-- Add more phrase elements as needed -->
11
- <strong id="strong_id" class="strong_class">this is a strong</strong>
12
- <strong id="other_strong_id" class="other_strong_class">this is another strong</strong>
13
-
14
- </body>
15
- </html>
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
- "http://www.w3.org/TR/html4/strict.dtd">
3
- <html lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
- <title>Select boxes</title>
7
- </head>
8
-
9
- <body>
10
- <select name="year" id="year">
11
- <option value="2009">2009</option>
12
- <option value="2010">2010</option>
13
- <option value="2011">2011</option>
14
- <option value="2012">2012</option>
15
- <option value="2013">2013</option>
16
- </select>
17
- </body>
18
- </html>
@@ -1,12 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
2
- "http://www.w3.org/TR/html4/strict.dtd">
3
- <html lang="en">
4
- <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
6
- <title>UTF8</title>
7
- </head>
8
-
9
- <body>
10
- <div id="utf8_string">æøå</div>
11
- </body>
12
- </html>
@@ -1,90 +0,0 @@
1
- <html>
2
- <title>Visibility test - Using CSS with and without inline style</title>
3
- <head>
4
- <style type='text/css'>
5
- .stylinvi {
6
- visibility: hidden;
7
- }
8
- .stylblock {
9
- display: none
10
- }
11
- </style>
12
- <script type="text/javascript" language="JavaScript">
13
- <!--
14
- function visi(nr)
15
- {
16
- t1 = document.getElementById(nr);
17
- if (document.getElementById)
18
- {
19
- if (t1.currentStyle)
20
- {
21
- vista = (t1.currentStyle.visibility == 'hidden') ? 'visible' : 'hidden';
22
- t1.style.visibility = vista;
23
- } else if (document.defaultView)
24
- {
25
- vista = (document.defaultView.getComputedStyle(t1,null).visibility == 'hidden') ? 'visible' : 'hidden';
26
- t1.style.visibility = vista;
27
- }
28
- }
29
- }
30
-
31
- function blocking(nr)
32
- {
33
- t1 = document.getElementById(nr);
34
- if (document.getElementById)
35
- {
36
- if (t1.currentStyle)
37
- {
38
- vista = (t1.currentStyle.display == 'none') ? 'block' : 'none';
39
- t1.style.display = vista;
40
- } else if (document.defaultView)
41
- {
42
- vista = (document.defaultView.getComputedStyle(t1,null).display == 'none') ? 'block' : 'none';
43
- t1.style.display = vista;
44
- }
45
- }
46
- }
47
- -->
48
- </script>
49
- </head>
50
- <body>
51
-
52
- <ol>
53
- <li>DIV 1:
54
- <ul>
55
- <li class=""><a id="div1vis" onclick="visi('div1'); return false" href="#" class="page">Toggle visible/invisible</a>
56
- </li><li class="odd"><a id="div1blk" onclick="blocking('div1'); return false;" href="#" class="page">Toggle display block/none</a>
57
- </li></ul>
58
- </li><li>DIV 2:
59
- <ul>
60
- <li class=""><a id="div2vis" onclick="visi('div2'); return false" href="#" class="page">Toggle visible/invisible</a>
61
- </li>
62
- </ul>
63
- </li><li>DIV 3:
64
- <ul>
65
- <li class="odd"><a id="div3blk" onclick="blocking('div3'); return false;" href="#" class="page">Toggle display block/none</a> </li>
66
- </ul>
67
- </li></ol>
68
-
69
- <div id="div1">
70
- <label id="lgnId1lbl1" for="lgnId1">Name 1</label>
71
- <input type="text" id="lgnId1" value="" size="25" maxlength="97" name="loginId1"/>
72
- <input type="submit" title="Click1" alt="Sign In" tabindex="3" value="Click1" id="submitAol1"/>
73
- </div>
74
-
75
- <div id="div2" class="stylinvi">
76
- <label id="lgnId1lbl2" for="lgnId2">Name 2</label>
77
- <input type="text" id="lgnId2" value="" size="25" maxlength="97" name="loginId2"/>
78
- <input type="submit" title="Click2" alt="Sign In" tabindex="3" value="Click2" id="submitAol2"/>
79
- </div>
80
-
81
- <div id="div3" class="stylblock">
82
- <label id="lgnId1lbl3" for="lgnId3">Name 3</label>
83
- <input type="text" id="lgnId3" value="" size="25" maxlength="97" name="loginId3"/>
84
- <input type="submit" title="Click3" alt="Sign In" value="Click3" id="submitAol3"/>
85
- </div>
86
-
87
- <input type="hidden" id="hidden-type">
88
-
89
- </body>
90
- </html>
@@ -1,15 +0,0 @@
1
- <html>
2
- <head>
3
- <title>Wait Tests</title>
4
- <script type="text/javascript">
5
- function toggleDiv() {
6
- var divStyle = document.getElementById('div1').style;
7
- divStyle.display = divStyle.display == "none" ? "" : "none";
8
- }
9
- </script>
10
- </head>
11
-
12
- <div id="div1">div1</div>
13
- <a id="link1" href="javascript:void(0)" onclick="javascript:setTimeout(toggleDiv, 500);">Click me!</a>
14
-
15
- </html>
@@ -1,64 +0,0 @@
1
- DIV {font-size: 24pt;}
2
- .redText {color: red;}
3
- .blueText {color: blue;}
4
- .italicText {font-style: italic;}
5
-
6
- SPAN {font-size: 18pt;}
7
- .redText {color: red;}
8
- .blueText {color: blue;}
9
- .italicText {font-style: italic;}
10
- .inherited {color: blue;}
11
-
12
-
13
- P{font-size: 24pt;}
14
- .redText {color: red;}
15
- .blueText {color: blue;}
16
- .italicText {font-style: italic;}
17
-
18
- .italic_button {
19
- background-color: silver;
20
- border-width: 3;
21
- color: black;
22
- font-style: italic;
23
- }
24
-
25
-
26
- .link_class_1 a:link {
27
- background-color: red;
28
- border-width: 3;
29
- color: white;
30
- width : 3em ;
31
- height : 3em ;
32
- font-style: italic;
33
- }
34
-
35
- .check_box_style {
36
- background-color: red;
37
- border-width: 3;
38
- color: white;
39
- width : 3em ;
40
- height : 3em ;
41
- }
42
-
43
-
44
- .radio_style {
45
- background-color: yellow;
46
- border-width: 3;
47
- color: green;
48
- width : 2em ;
49
- height : 2em ;
50
- }
51
-
52
- select.list_style {
53
- background-color: yellow;
54
- border-width: 3;
55
- color: green;
56
- font-style: italic;
57
- }
58
-
59
- option.option_style {
60
- background-color: red;
61
- border-width: 3;
62
- color: white;
63
-
64
- }
@@ -1,29 +0,0 @@
1
- <html>
2
- <head>
3
- <title>
4
- Test page for whitespace
5
- </title>
6
- <link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
7
- </head>
8
- <body>
9
-
10
- <a href="pass.html">&nbsp;Login&nbsp;</a>
11
- <p>
12
- <span id="single_nbsp">
13
- Test for&nbsp;nbsp.
14
- </span>
15
- <p>
16
- <span id="multiple_spaces">
17
- Test for multiple spaces.
18
- </span>
19
- <p>
20
- <span id="space_tab">
21
- Test for space and tab.
22
- </span>
23
- <p>
24
- <span id="space_w_cr">
25
- Test for space and
26
- cr.
27
- </span>
28
- </body>
29
- </html>
@@ -1,13 +0,0 @@
1
- # This file specifies options affecting the unit tests.
2
- # You need to copy this file to "options.yml" before it to work.
3
-
4
- # These options can also be set using environment variables prefixed with 'watir_'.
5
- # These environment variables will override settings from this file.
6
-
7
- # 'ie' (Watir::IE) or 'firefox' (FireWatir::Firefox)
8
- browser: ie
9
-
10
- # These options only affect IE.
11
- # speed options are fast, slow, and zippy
12
- speed: fast
13
- visible: true
@@ -1,19 +0,0 @@
1
- $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
2
- require 'unittests/setup'
3
-
4
- class TC_SelectLists < Test::Unit::TestCase
5
- location __FILE__
6
-
7
- def setup
8
- uses_page "select_lists.html"
9
- end
10
-
11
- def test_select_by_numeric
12
- # make sure we still find the right option if passed a number
13
- browser.select_list(:id, 'year').select(2011)
14
- assert_equal(['2011'], browser.select_list(:id, 'year').selected_options.map(&:text))
15
- end
16
-
17
- end
18
-
19
-
@@ -1,17 +0,0 @@
1
- $SETUP_LOADED = true
2
-
3
- $myDir = File.expand_path(File.dirname(__FILE__))
4
-
5
- # use local development versions of watir, firewatir, commonwatir if available
6
- topdir = File.join(File.dirname(__FILE__), '..')
7
- $firewatir_dev_lib = File.join(topdir, '..', 'firewatir', 'lib')
8
- $watir_dev_lib = File.join(topdir, '..', 'watir', 'lib')
9
- $LOAD_PATH.unshift File.expand_path(File.join(topdir, 'lib'))
10
-
11
- require 'watir/browser'
12
- Watir::Browser.default = 'ie'
13
- require 'unittests/setup/lib'
14
-
15
- Dir.chdir topdir do
16
- $all_tests = Dir["unittests/*_test.rb"]
17
- end
@@ -1,14 +0,0 @@
1
- # setup/browser
2
- require 'watir/browser'
3
- case Watir.options[:browser]
4
- when 'ie'
5
- $LOAD_PATH.unshift File.expand_path($watir_dev_lib)
6
- when 'firefox'
7
- $LOAD_PATH.unshift File.expand_path($firewatir_dev_lib)
8
- end
9
- $browser = Watir::Browser.new
10
-
11
- # close browser at completion of the tests
12
- # the at_exit execute before loading test/unit, otherwise IE will close *before* the tests run.
13
- at_exit {$browser.close if $browser}
14
-
@@ -1,17 +0,0 @@
1
- require "stringio"
2
-
3
- module CaptureIOHelper
4
-
5
- def capture_stdout(&blk)
6
- old = $stdout
7
- $stdout = io = StringIO.new
8
-
9
- yield
10
-
11
- io.string
12
- ensure
13
- $stdout = old
14
- end
15
- end
16
-
17
-
@@ -1,24 +0,0 @@
1
- require 'test/unit'
2
-
3
- require 'test/unit/collector/objectspace'
4
-
5
- # Modify the Test::Unit runner in Eclipse, so it only runs our tests
6
- module Test::Unit
7
- module RDT
8
- def self.buildSuite filename
9
- collector = Test::Unit::Collector::ObjectSpace.new
10
- collector.filter = Watir::UnitTest.filter
11
- collector.collect filename
12
- end
13
- end
14
- end
15
-
16
- # Invoke default test runner so it only runs our tests
17
- at_exit do
18
- unless $! || Test::Unit.run?
19
- runner = Test::Unit::AutoRunner.new false
20
- runner.process_args ARGV
21
- runner.filters = Watir::UnitTest.filter
22
- exit runner.run
23
- end
24
- end
@@ -1,22 +0,0 @@
1
- $myDir.sub!( %r{/cygdrive/(\w)/}, '\1:/' ) # convert from cygwin to dos
2
-
3
- require 'watir/options'
4
- Watir.options_file = $suite_options_file = $myDir + '/options.yml'
5
- require 'unittests/setup/options'
6
- unit_options = Watir::UnitTest::Options.new.execute
7
- require 'unittests/setup/browser'
8
- require 'unittests/setup/filter'
9
- require 'unittests/setup/capture_io_helper'
10
- require 'unittests/setup/watir-unittest'
11
-
12
- failure_tag = "fails_on_#{Watir.options[:browser]}".to_sym
13
- case unit_options[:coverage]
14
- when 'regression'
15
- Watir::UnitTest.filter_out_tests_tagged failure_tag
16
- when 'known failures'
17
- Watir::UnitTest.filter_out do |test|
18
- !(test.tagged? failure_tag)
19
- end
20
- end
21
-
22
-
@@ -1,29 +0,0 @@
1
- # setup/options
2
- require 'user-choices'
3
-
4
- module Watir
5
- module UnitTest
6
- class Options < UserChoices::Command
7
- include UserChoices
8
- def add_sources builder
9
- builder.add_source EnvironmentSource, :with_prefix, 'watir_'
10
- builder.add_source YamlConfigFileSource, :from_complete_path,
11
- $suite_options_file
12
- end
13
- def add_choices builder
14
- builder.add_choice :coverage,
15
- :type => ['regression', 'all', 'known failures'],
16
- :default => 'regression'
17
- end
18
- def execute
19
- Watir::UnitTest.options = @user_choices
20
- end
21
- end
22
- def self.options
23
- @@options
24
- end
25
- def self.options= x
26
- @@options = x
27
- end
28
- end
29
- end
@@ -1,8 +0,0 @@
1
- module Test::Unit::Assertions
2
- def assert_false(boolean, message=nil)
3
- _wrap_assertion do
4
- assert_block("assert should not be called with a block.") { !block_given? }
5
- assert_block(build_message(message, "<?> is not false.", boolean)) { !boolean }
6
- end
7
- end
8
- end # module test