watir-classic 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. data/CHANGES +721 -0
  2. data/LICENSE +34 -0
  3. data/README.rdoc +78 -0
  4. data/VERSION +1 -0
  5. data/bin/watir-console +5 -0
  6. data/lib/watir-classic.rb +14 -0
  7. data/lib/watir-classic/IEDialog/Release/IEDialog.dll +0 -0
  8. data/lib/watir-classic/assertions.rb +44 -0
  9. data/lib/watir-classic/browser.rb +149 -0
  10. data/lib/watir-classic/browsers.rb +7 -0
  11. data/lib/watir-classic/close_all.rb +31 -0
  12. data/lib/watir-classic/container.rb +110 -0
  13. data/lib/watir-classic/contrib/enabled_popup.rb +21 -0
  14. data/lib/watir-classic/contrib/ie-new-process.rb +27 -0
  15. data/lib/watir-classic/contrib/page_checker.rb +29 -0
  16. data/lib/watir-classic/cookies.rb +80 -0
  17. data/lib/watir-classic/core.rb +43 -0
  18. data/lib/watir-classic/dialogs/file_field.rb +34 -0
  19. data/lib/watir-classic/dialogs/javascript.rb +43 -0
  20. data/lib/watir-classic/drag_and_drop_helper.rb +68 -0
  21. data/lib/watir-classic/element.rb +438 -0
  22. data/lib/watir-classic/element_collection.rb +109 -0
  23. data/lib/watir-classic/element_extensions.rb +69 -0
  24. data/lib/watir-classic/exceptions.rb +50 -0
  25. data/lib/watir-classic/form.rb +96 -0
  26. data/lib/watir-classic/frame.rb +47 -0
  27. data/lib/watir-classic/ie-class.rb +767 -0
  28. data/lib/watir-classic/ie-process.rb +47 -0
  29. data/lib/watir-classic/ie.rb +20 -0
  30. data/lib/watir-classic/image.rb +111 -0
  31. data/lib/watir-classic/input_elements.rb +480 -0
  32. data/lib/watir-classic/irb-history.rb +31 -0
  33. data/lib/watir-classic/link.rb +46 -0
  34. data/lib/watir-classic/locator.rb +243 -0
  35. data/lib/watir-classic/logger.rb +19 -0
  36. data/lib/watir-classic/matches.rb +23 -0
  37. data/lib/watir-classic/modal_dialog.rb +72 -0
  38. data/lib/watir-classic/module.rb +12 -0
  39. data/lib/watir-classic/non_control_elements.rb +114 -0
  40. data/lib/watir-classic/options.rb +56 -0
  41. data/lib/watir-classic/page-container.rb +114 -0
  42. data/lib/watir-classic/process.rb +20 -0
  43. data/lib/watir-classic/screen_capture.rb +115 -0
  44. data/lib/watir-classic/supported_elements.rb +172 -0
  45. data/lib/watir-classic/table.rb +224 -0
  46. data/lib/watir-classic/testcase.rb +97 -0
  47. data/lib/watir-classic/util.rb +35 -0
  48. data/lib/watir-classic/version.rb +4 -0
  49. data/lib/watir-classic/wait.rb +41 -0
  50. data/lib/watir-classic/wait_helper.rb +12 -0
  51. data/lib/watir-classic/waiter.rb +98 -0
  52. data/lib/watir-classic/win32.rb +40 -0
  53. data/lib/watir-classic/win32ole.rb +16 -0
  54. data/lib/watir-classic/win32ole/1.8.7/win32ole.so +0 -0
  55. data/lib/watir-classic/win32ole/1.9.3/win32ole.so +0 -0
  56. data/lib/watir-classic/window.rb +68 -0
  57. data/lib/watir-classic/xpath_locator.rb +52 -0
  58. data/rakefile.rb +54 -0
  59. data/unittests/all_tests.rb +10 -0
  60. data/unittests/buttons_xpath_test.rb +68 -0
  61. data/unittests/checkbox_test.rb +163 -0
  62. data/unittests/checkbox_xpath_test.rb +106 -0
  63. data/unittests/click_no_wait_test.rb +23 -0
  64. data/unittests/close_all_test.rb +17 -0
  65. data/unittests/core_tests.rb +17 -0
  66. data/unittests/css_selector_test.rb +44 -0
  67. data/unittests/css_test.rb +38 -0
  68. data/unittests/dialog_test.rb +64 -0
  69. data/unittests/div2_xpath_test.rb +21 -0
  70. data/unittests/div_test.rb +170 -0
  71. data/unittests/div_xpath_test.rb +95 -0
  72. data/unittests/document_standards.rb +63 -0
  73. data/unittests/element_collection_indexes_test.rb +57 -0
  74. data/unittests/element_collections_test.rb +100 -0
  75. data/unittests/element_test.rb +47 -0
  76. data/unittests/errorchecker_test.rb +31 -0
  77. data/unittests/filefield_test.rb +43 -0
  78. data/unittests/filefield_xpath_test.rb +35 -0
  79. data/unittests/form_test.rb +282 -0
  80. data/unittests/form_xpath_test.rb +254 -0
  81. data/unittests/frame_test.rb +165 -0
  82. data/unittests/google_form_test.rb +15 -0
  83. data/unittests/html/JavascriptClick.html +39 -0
  84. data/unittests/html/blankpage.html +11 -0
  85. data/unittests/html/buttons1.html +40 -0
  86. data/unittests/html/checkboxes1.html +89 -0
  87. data/unittests/html/click_no_wait.html +14 -0
  88. data/unittests/html/complex_table.html +35 -0
  89. data/unittests/html/cssTest.html +42 -0
  90. data/unittests/html/depot_store.html +59 -0
  91. data/unittests/html/div.html +92 -0
  92. data/unittests/html/div_xml.html +21 -0
  93. data/unittests/html/fileupload.html +44 -0
  94. data/unittests/html/formTest1.html +38 -0
  95. data/unittests/html/forms2.html +44 -0
  96. data/unittests/html/forms3.html +131 -0
  97. data/unittests/html/forms4.html +26 -0
  98. data/unittests/html/frame_buttons.html +4 -0
  99. data/unittests/html/frame_links.html +4 -0
  100. data/unittests/html/frame_multi.html +5 -0
  101. data/unittests/html/google_india.html +119 -0
  102. data/unittests/html/ie7_document_standards.html +9 -0
  103. data/unittests/html/ie8_document_standards.html +9 -0
  104. data/unittests/html/ie9_document_standards.html +9 -0
  105. data/unittests/html/iframe.html +3 -0
  106. data/unittests/html/iframeTest.html +17 -0
  107. data/unittests/html/iframeTest1.html +7 -0
  108. data/unittests/html/iframeTest2.html +5 -0
  109. data/unittests/html/images/1.gif +0 -0
  110. data/unittests/html/images/2.GIF +0 -0
  111. data/unittests/html/images/3.GIF +0 -0
  112. data/unittests/html/images/button.jpg +0 -0
  113. data/unittests/html/images/circle.jpg +0 -0
  114. data/unittests/html/images/map.GIF +0 -0
  115. data/unittests/html/images/map2.gif +0 -0
  116. data/unittests/html/images/minus.GIF +0 -0
  117. data/unittests/html/images/originaltriangle.jpg +0 -0
  118. data/unittests/html/images/plus.gif +0 -0
  119. data/unittests/html/images/square.jpg +0 -0
  120. data/unittests/html/images/triangle.jpg +0 -0
  121. data/unittests/html/images1.html +65 -0
  122. data/unittests/html/javascriptevents.html +33 -0
  123. data/unittests/html/link_pass.html +11 -0
  124. data/unittests/html/links1.html +37 -0
  125. data/unittests/html/links2.html +11 -0
  126. data/unittests/html/links_multi.html +12 -0
  127. data/unittests/html/list_matters.html +720 -0
  128. data/unittests/html/lists.html +18 -0
  129. data/unittests/html/map_test.html +30 -0
  130. data/unittests/html/modal_dialog.html +10 -0
  131. data/unittests/html/modal_dialog_launcher.html +12 -0
  132. data/unittests/html/multiple_specifiers.html +64 -0
  133. data/unittests/html/nestedFrames.html +6 -0
  134. data/unittests/html/new_browser.html +17 -0
  135. data/unittests/html/pass.html +13 -0
  136. data/unittests/html/popups1.html +59 -0
  137. data/unittests/html/pre.html +29 -0
  138. data/unittests/html/quirks_document_standards.html +8 -0
  139. data/unittests/html/radioButtons1.html +71 -0
  140. data/unittests/html/select_tealeaf.html +54 -0
  141. data/unittests/html/selectboxes1.html +52 -0
  142. data/unittests/html/simple_table.html +25 -0
  143. data/unittests/html/simple_table_buttons.html +104 -0
  144. data/unittests/html/simple_table_columns.html +75 -0
  145. data/unittests/html/table1.html +179 -0
  146. data/unittests/html/tableCell_using_xpath.html +19 -0
  147. data/unittests/html/table_and_tablerow_to_a.html +174 -0
  148. data/unittests/html/textarea.html +30 -0
  149. data/unittests/html/textfields1.html +100 -0
  150. data/unittests/html/textsearch.html +44 -0
  151. data/unittests/html/wallofcheckboxes.html +1003 -0
  152. data/unittests/html/xpath_nbsp.html +11 -0
  153. data/unittests/html/zeroindex.html +11 -0
  154. data/unittests/ie_exists_test.rb +16 -0
  155. data/unittests/ie_mock.rb +94 -0
  156. data/unittests/ie_test.rb +54 -0
  157. data/unittests/images_test.rb +156 -0
  158. data/unittests/images_xpath_test.rb +90 -0
  159. data/unittests/index_specifier_test.rb +31 -0
  160. data/unittests/js_events_test.rb +31 -0
  161. data/unittests/links_multi_test.rb +34 -0
  162. data/unittests/links_test.rb +131 -0
  163. data/unittests/links_xpath_test.rb +38 -0
  164. data/unittests/lists_test.rb +23 -0
  165. data/unittests/map_test.rb +98 -0
  166. data/unittests/minmax_test.rb +37 -0
  167. data/unittests/navigate_test.rb +38 -0
  168. data/unittests/nbsp_xpath_test.rb +16 -0
  169. data/unittests/no_wait_test.rb +28 -0
  170. data/unittests/non_core_tests.rb +12 -0
  171. data/unittests/other/all_tests_concurrent.rb +57 -0
  172. data/unittests/other/navigate_exception_test.rb +24 -0
  173. data/unittests/other/rexml_unit_test.rb +27 -0
  174. data/unittests/other/screen_capture_test.rb +53 -0
  175. data/unittests/other/testcase_method_order_test.rb +36 -0
  176. data/unittests/other/testcase_verify_test.rb +25 -0
  177. data/unittests/other/wait_until_test.rb +102 -0
  178. data/unittests/pagecontainstext_test.rb +69 -0
  179. data/unittests/parent_child_test.rb +27 -0
  180. data/unittests/perf_test.rb +20 -0
  181. data/unittests/pre_test.rb +49 -0
  182. data/unittests/radios_test.rb +181 -0
  183. data/unittests/radios_xpath_test.rb +100 -0
  184. data/unittests/security_setting_test.rb +24 -0
  185. data/unittests/selectbox_test.rb +144 -0
  186. data/unittests/selectbox_xpath_test.rb +102 -0
  187. data/unittests/setup.rb +69 -0
  188. data/unittests/speed_settings_test.rb +67 -0
  189. data/unittests/table_cell_using_xpath_test.rb +34 -0
  190. data/unittests/table_test.rb +296 -0
  191. data/unittests/table_xpath_test.rb +109 -0
  192. data/unittests/test_tests.rb +9 -0
  193. data/unittests/textarea_test.rb +92 -0
  194. data/unittests/textarea_xpath_test.rb +77 -0
  195. data/unittests/textfield_for_ch_char_test.rb +32 -0
  196. data/unittests/textfields_test.rb +184 -0
  197. data/unittests/textfields_xpath_test.rb +110 -0
  198. data/unittests/version_test.rb +15 -0
  199. data/unittests/win32ole_so_test.rb +35 -0
  200. data/unittests/window_tests.rb +10 -0
  201. data/unittests/windows/attach_to_existing_window_test.rb +52 -0
  202. data/unittests/windows/attach_to_new_window_test.rb +74 -0
  203. data/unittests/windows/close_window_test.rb +20 -0
  204. data/unittests/windows/frame_links_test.rb +23 -0
  205. data/unittests/windows/ie-each_test.rb +46 -0
  206. data/unittests/windows/modal_dialog_test.rb +95 -0
  207. data/unittests/windows/new_process_test.rb +24 -0
  208. data/unittests/windows/new_test.rb +58 -0
  209. data/unittests/windows/open_close_test.rb +19 -0
  210. data/unittests/windows/send_keys_test.rb +26 -0
  211. data/unittests/xpath_tests.rb +11 -0
  212. data/watir-rdoc.rb +7 -0
  213. metadata +370 -0
@@ -0,0 +1,25 @@
1
+ <!doctype html>
2
+ <head>
3
+ <title>
4
+ Test page for Tables
5
+ </title>
6
+ </head>
7
+ <body>
8
+ <br>
9
+ <br>
10
+ <table >
11
+ <tr>
12
+ <td> Row 1 Col1 </td>
13
+ <td> Row 1 Col2 </td>
14
+ </tr>
15
+ <tr>
16
+ <td> Row 2 Col1 </td>
17
+ <td> Row 2 Col2 </td>
18
+ </tr>
19
+ <tr>
20
+ <td> Row 3 Col1 </td>
21
+ <td> Row 3 Col2 </td>
22
+ </tr>
23
+ </table>
24
+ </body>
25
+ </html>
@@ -0,0 +1,104 @@
1
+ <!doctype html>
2
+ <head>
3
+ <title>
4
+ simple table buttons
5
+ </title>
6
+ </head>
7
+ <body>
8
+
9
+ <input type = text name="confirmtext">
10
+ <table >
11
+ <tr>
12
+ <td> <input type = button value = "Click" id = "b1" onClick = "document.all.confirmtext.value = 'CLICK1';"><td>Click1 </td>
13
+ </tr>
14
+ <tr>
15
+ <td> <input type = button value = "Click" onClick = "document.all.confirmtext.value = 'CLICK2';"><td>Click2 </td>
16
+ </tr>
17
+ <tr>
18
+ <td> <input type = button value = "Click" onClick = "document.all.confirmtext.value = 'CLICK3';">
19
+ <input type = button value = "Click too" onClick = "document.all.confirmtext.value = 'CLICK TOO';">
20
+ <td>Click3</td>
21
+ </tr>
22
+ <tr>
23
+ <td> <input type = text value = "Im a text field" ></td>
24
+ </tr>
25
+
26
+
27
+ <tr>
28
+ <td>An input field and a button in the same cell<br> <input type = text name='same_cell' value = "Click ->" ><input type=button value = "Click To Change <-" onClick = "document.all.same_cell.value = '';" </td>
29
+ </tr>
30
+
31
+ </table>
32
+
33
+ This table has 3 images in each row. Each is a seperate cell
34
+ <table>
35
+ <tr>
36
+ <td><img src = images/1.gif><td><img src = images/2.gif><td><img src = images/3.gif>
37
+ <tr>
38
+ <td><img src = images/1.gif><td><img src = images/2.gif><td><img src = images/3.gif>
39
+ <tr>
40
+ <td><img src = images/1.gif><td><img src = images/2.gif><td><img src = images/3.gif>
41
+ </table>
42
+
43
+ This table has 3 images in each row. They are all in the same cell
44
+ <table>
45
+ <tr>
46
+ <td><img src = images/1.gif><img src = images/2.gif><img src = images/3.gif>
47
+ <tr>
48
+ <td><img src = images/1.gif><img src = images/2.gif><img src = images/3.gif>
49
+ <tr>
50
+ <td><img src = images/1.gif><img src = images/2.gif><img src = images/3.gif>
51
+ </table>
52
+
53
+
54
+ <style type="text/css">
55
+ div.hide { display: none; margin-left: auto; margin-right: auto; }
56
+ div.show { display: block; margin-left: auto; margin-right: auto; }
57
+
58
+ tr.hide { display: none; margin-left: auto; margin-right: auto; }
59
+ tr.show { display: block; margin-left: auto; margin-right: auto; }
60
+
61
+ </style>
62
+
63
+
64
+ <script language=javascript>
65
+
66
+ function expand_or_shrink_row( row ) {
67
+
68
+ which_row = 'r' + row;
69
+ which_image = 'i' + row;
70
+ if ( document.getElementById(which_row).className=='hide' ){
71
+ document.getElementById(which_row).className='show';
72
+ document.getElementById(which_image).src='images/minus.gif';
73
+
74
+ }
75
+ else {
76
+ document.getElementById(which_row).className='hide'
77
+ document.getElementById(which_image).src='images/plus.gif'
78
+ }
79
+
80
+ }
81
+
82
+ </script>
83
+
84
+ The table below can show or hide its rows. Click the + (or -) to show or hide the row
85
+ <table id=show_hide>
86
+ <tr><td><img id=i1 width=30 height=30 src = images/plus.gif onClick='javascript:expand_or_shrink_row("1")'>
87
+ <tr class = hide id=r1><td>Line 1
88
+ <tr><td><img id=i2 width=30 height=30 src = images/plus.gif onClick='javascript:expand_or_shrink_row("2")'>
89
+ <tr class = hide id=r2><td>Line 2
90
+ <tr><td><img id=i3 width=30 height=30 src = images/plus.gif onClick='javascript:expand_or_shrink_row("3")'>
91
+ <tr class = hide id=r3><td>Line 3
92
+ <tr><td><img id=i4 width=30 height=30 src = images/plus.gif onClick='javascript:expand_or_shrink_row("4")'>
93
+ <tr class = hide id=r4><td>Line 4
94
+ <tr><td><img id=i5 width=30 height=30 src = images/plus.gif onClick='javascript:expand_or_shrink_row("5")'>
95
+ <tr class = hide id=r5><td>Line 5
96
+ </table>
97
+
98
+
99
+
100
+
101
+
102
+ </body>
103
+
104
+ </html>
@@ -0,0 +1,75 @@
1
+ <!doctype html>
2
+ <head>
3
+ <title>
4
+ Test page for testing column value extraction
5
+ </title>
6
+ </head>
7
+ <body>
8
+ <br>
9
+ <br>
10
+ <b>Test page for testing column value extraction</b>
11
+ <br>
12
+ <br>
13
+ Single Column
14
+ <table border="1">
15
+ <tr>
16
+ <td>R1C1</td>
17
+ </tr>
18
+ <tr>
19
+ <td>R2C1</td>
20
+ </tr>
21
+ <tr>
22
+ <td>R3C1</td>
23
+ </tr>
24
+ </table>
25
+ <br>
26
+ Multiple Column
27
+ <table border="1">
28
+ <tr>
29
+ <td>R1C1</td>
30
+ <td>R1C2</td>
31
+ <td>R1C3</td>
32
+ </tr>
33
+ <tr>
34
+ <td>R2C1</td>
35
+ <td>R2C2</td>
36
+ <td>R2C3</td>
37
+ </tr>
38
+ <tr>
39
+ <td>R3C1</td>
40
+ <td>R3C2</td>
41
+ <td>R3C3</td>
42
+ </tr>
43
+ </table>
44
+ <br>
45
+ Multiple Column With Jagged ColSpan
46
+ <table border="1">
47
+ <tr>
48
+ <td>R1C1</td>
49
+ <td>R1C2</td>
50
+ <td>R1C3</td>
51
+ </tr>
52
+ <tr>
53
+ <td colspan="2">R2C1</td>
54
+ <td>R2C2</td>
55
+ </tr>
56
+ <tr>
57
+ <td>R3C1</td>
58
+ <td>R3C2</td>
59
+ <td>R3C3</td>
60
+ </tr>
61
+ <tr>
62
+ <td colspan="3">R4C1</td>
63
+ </tr>
64
+ <tr>
65
+ <td rowspan="2">R5C1</td>
66
+ <td>R5C2</td>
67
+ <td>R5C3</td>
68
+ </tr>
69
+ <tr>
70
+ <td>R6C2</td>
71
+ <td>R6C3</td>
72
+ </tr>
73
+ </table>
74
+ </body>
75
+ </html>
@@ -0,0 +1,179 @@
1
+ <!doctype html>
2
+ <head>
3
+ <title>
4
+ Test page for Tables
5
+ </title>
6
+ </head>
7
+ <body>
8
+
9
+ <style type="text/css">
10
+ table.sample {
11
+ border-width: 1px 1px 1px 1px;
12
+ border-spacing: 2px;
13
+ border-style: outset outset outset outset;
14
+ border-color: gray gray gray gray;
15
+ border-collapse: separate;
16
+ background-color: white;
17
+ }
18
+ table.sample th {
19
+ border-width: 1px 1px 1px 1px;
20
+ padding: 1px 1px 1px 1px;
21
+ border-style: inset inset inset inset;
22
+ border-color: gray gray gray gray;
23
+ background-color: white;
24
+ -moz-border-radius: 0px 0px 0px 0px;
25
+ }
26
+ table.sample td {
27
+ border-width: 1px 1px 1px 1px;
28
+ padding: 1px 1px 1px 1px;
29
+ border-style: inset inset inset inset;
30
+ border-color: gray gray gray gray;
31
+ background-color: white;
32
+ -moz-border-radius: 0px 0px 0px 0px;
33
+ }
34
+ </style>
35
+
36
+ <script language=javascript>
37
+
38
+ function addRow() {
39
+
40
+ var tbody = document.getElementById('t1' ).getElementsByTagName("TBODY")[0];
41
+
42
+ // Create a TR
43
+ var row = document.createElement("TR");
44
+ row.setAttribute("class", "normal");
45
+ row.setAttribute("border", "1");
46
+
47
+ for (j=0 ; j < document.getElementById('t1' ).rows(1).cells.length; j++) {
48
+ // Create a TD
49
+ var td = document.createElement("TD");
50
+ td.setAttribute("border","1");
51
+ td.innerHTML = "New Cell";
52
+
53
+ // Assign TD to TR and then assign TR to TBODY
54
+ row.appendChild(td);
55
+ }
56
+ tbody.appendChild(row);
57
+ }
58
+
59
+ </script>
60
+ <br>
61
+ <br>
62
+ <table >
63
+ <tr>
64
+ <td> Row 1 Col1
65
+ <td> Row 1 Col2
66
+ <tr>
67
+ <td> Row 2 Col1
68
+ <td> Row 2 Col2
69
+ </table>
70
+
71
+
72
+ <br>
73
+ <br>
74
+ <table id= 't1'>
75
+ <Tr><td colspan=2>Table 2
76
+ <tr>
77
+ <td id=cell1> Row 1 Col1
78
+ <td> Row 1 Col2
79
+ <tr id=row1>
80
+ <td> Row 2 Col1
81
+ <td> Row 2 Col2
82
+ <tr>
83
+ <td> Row 3 Col1
84
+ <td> Row 3 Col2
85
+ <tr>
86
+ <td> Row 4 Col1
87
+ <td> Row 4 Col2
88
+
89
+ </table>
90
+ <br>
91
+ <input type=button value='add row' onClick='javascript:addRow()'>
92
+
93
+ <br>
94
+ <br>
95
+
96
+ The following has a nested table
97
+ <table id='t2' border=1>
98
+ <tr>
99
+ <td>
100
+ cell 1
101
+ <td>
102
+ cell2
103
+ <tr>
104
+ <td>
105
+ <table><tr><td>nest1<td>nest2</table>
106
+ <td>
107
+ Normal
108
+
109
+ </table>
110
+
111
+
112
+ <br>
113
+ This table has 3 body tags. Mostly based on http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/tbody.asp?frame=true
114
+ <br><br>
115
+ <table id=body_test>
116
+ <THEAD>
117
+ <TR>
118
+ <TD>
119
+ This text is in the THEAD.
120
+ </TD>
121
+ </TR>
122
+ </THEAD>
123
+ <TBODY>
124
+ <TR>
125
+ <TD>
126
+ This text is in the FRST TBODY.
127
+ </TD>
128
+ </TR>
129
+ </TBODY>
130
+
131
+ <TBODY>
132
+ <TR>
133
+ <TD>
134
+ This text is in the SECOND TBODY.
135
+ </TD>
136
+ </TR>
137
+ <TR>
138
+ <TD>
139
+ This text is also in the SECOND TBODY.
140
+ </TD>
141
+ </TR>
142
+ </TBODY>
143
+
144
+ <TBODY>
145
+ <TR>
146
+ <TD>
147
+ This text is in the THIRD TBODY.
148
+ </TD>
149
+ </TR>
150
+ </TBODY>
151
+
152
+ </TABLE>
153
+
154
+ <table id=pic_table>
155
+ <tr>
156
+ <td> A picture is in the next cell
157
+ <td><img src=images/circle.jpg>
158
+
159
+ <td> A link is in the next cell
160
+ <td><a href = http://google.com>Google</a>
161
+
162
+
163
+
164
+ <table class="sample">
165
+ <tr>
166
+ <th>Header</th>
167
+ <td>First table with css class</td>
168
+ </tr>
169
+ </table>
170
+
171
+ <table class="sample">
172
+ <tr>
173
+ <td>Second table with css class</td>
174
+ </tr>
175
+ </table>
176
+
177
+
178
+ </body>
179
+ </html>
@@ -0,0 +1,19 @@
1
+ <!doctype html>
2
+ <head>
3
+ <title>Testing table cell using xpath.</title>
4
+ </head>
5
+ <body>
6
+ <table>
7
+ <tr>
8
+ <td colspan="1"><img src="images/square.jpg"> Table Cell with image of square.
9
+ </td>
10
+ <td colspan="2"><img src="images/triangle.jpg"> Table Cell with image of triangle.
11
+ </td>
12
+ <td colspan="3"><img src="images/circle.jpg"> Table Cell with image of circle.
13
+ </td>
14
+ <td colspan="4"><img src="images/button.jpg"> Table Cell with image of button.
15
+ </td>
16
+ </tr>
17
+ </table>
18
+ </body>
19
+ </html>
@@ -0,0 +1,174 @@
1
+ <!doctype html>
2
+ <head>
3
+ <style type="text/css">
4
+ table {
5
+ border-collapse: collapse;
6
+ }
7
+
8
+ table, tr, td, th {
9
+ border-width: 1px;
10
+ border-style: solid;
11
+ }
12
+
13
+ td {
14
+ width: 30px;
15
+ }
16
+
17
+ td.reddish {
18
+ color: red;
19
+ }
20
+ </style>
21
+ <title>Watir::Table#to_a and Watir::TableRow#to_a</title>
22
+ </head>
23
+
24
+ <body>
25
+ <p>normal table</p>
26
+ <table id="normal">
27
+ <tr>
28
+ <td>1</td>
29
+ <td>2</td>
30
+ <td>3</td>
31
+ </tr>
32
+ <tr>
33
+ <td>4</td>
34
+ <td>5</td>
35
+ <td>6</td>
36
+ </tr>
37
+ <tr>
38
+ <td>7</td>
39
+ <td>8</td>
40
+ <td class="reddish">9</td>
41
+ </tr>
42
+ </table>
43
+
44
+ <p>table with headers</p>
45
+ <table id="headers">
46
+ <tr>
47
+ <th>1</th>
48
+ <th>2</th>
49
+ <th>3</th>
50
+ <th>4</th>
51
+ </tr>
52
+ <tr>
53
+ <td>5</td>
54
+ <td>6</td>
55
+ <td>7</td>
56
+ <td>8</td>
57
+ </tr>
58
+ <tr>
59
+ <td>9</td>
60
+ <td>10</td>
61
+ <td>11</td>
62
+ <td>12</td>
63
+ </tr>
64
+ </table>
65
+
66
+ <p>table with nested tables</p>
67
+ <table id="nested">
68
+ <tr>
69
+ <th>1</th>
70
+ <th>2</th>
71
+ </tr>
72
+ <tr>
73
+ <td>
74
+ <table>
75
+ <tr>
76
+ <th>11</th>
77
+ <th>12</th>
78
+ </tr>
79
+ <tr>
80
+ <td>13</td>
81
+ <td>14</td>
82
+ </tr>
83
+ </table>
84
+ </td>
85
+ <td>3</td>
86
+ </tr>
87
+ </table>
88
+
89
+ <p>table with nested table with non-direct child</p>
90
+ <table id="nestednondirectchild">
91
+ <tr>
92
+ <th>1</th>
93
+ <th>2</th>
94
+ </tr>
95
+ <tr>
96
+ <td>
97
+ <span>
98
+ <table>
99
+ <tr>
100
+ <th>11</th>
101
+ <th>12</th>
102
+ </tr>
103
+ <tr>
104
+ <td>13</td>
105
+ <td>14</td>
106
+ </tr>
107
+ </table>
108
+ </span>
109
+ </td>
110
+ <td>3</td>
111
+ </tr>
112
+ </table>
113
+
114
+ <p>table with deep-nested tables</p>
115
+ <table id="deepnested">
116
+ <tr>
117
+ <th>1</th>
118
+ <th>2</th>
119
+ </tr>
120
+ <tr>
121
+ <td>
122
+ <table>
123
+ <tr>
124
+ <th>11</th>
125
+ <th>12</th>
126
+ </tr>
127
+ <tr>
128
+ <td>
129
+ <table>
130
+ <tr>
131
+ <td>404</td>
132
+ <td>405</td>
133
+ </tr>
134
+ <tr>
135
+ <td>406</td>
136
+ <td>407</td>
137
+ </tr>
138
+ </table>
139
+ </td>
140
+ <td>14</td>
141
+ </tr>
142
+ </table>
143
+ </td>
144
+ <td>3</td>
145
+ </tr>
146
+ </table>
147
+
148
+ <p>table with colspan</p>
149
+ <table id="colspan">
150
+ <tr>
151
+ <th>1</th>
152
+ <th>2</th>
153
+ </tr>
154
+ <tr>
155
+ <td colspan="2">3</td>
156
+ </tr>
157
+ </table>
158
+
159
+ <p>table with rowspan</p>
160
+ <table id="rowspan">
161
+ <tr>
162
+ <th>1</th>
163
+ <th>2</th>
164
+ </tr>
165
+ <tr>
166
+ <td>3</td>
167
+ <td rowspan="2">4</td>
168
+ </tr>
169
+ <tr>
170
+ <td>5</td>
171
+ </tr>
172
+ </table>
173
+ </body>
174
+ </html>