firewatir 1.6.2 → 1.6.5
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.
- data/LICENSE +32 -0
- data/lib/firewatir.rb +40 -50
- data/lib/firewatir/container.rb +491 -534
- data/lib/firewatir/document.rb +239 -0
- data/lib/firewatir/element.rb +1365 -0
- data/lib/firewatir/element_collections.rb +314 -0
- data/lib/firewatir/elements/button.rb +15 -0
- data/lib/firewatir/elements/file_field.rb +29 -0
- data/lib/firewatir/elements/form.rb +40 -0
- data/lib/firewatir/elements/frame.rb +55 -0
- data/lib/firewatir/elements/hidden.rb +56 -0
- data/lib/firewatir/elements/image.rb +139 -0
- data/lib/firewatir/elements/input_element.rb +44 -0
- data/lib/firewatir/elements/link.rb +76 -0
- data/lib/firewatir/elements/non_control_element.rb +53 -0
- data/lib/firewatir/elements/non_control_elements.rb +108 -0
- data/lib/firewatir/elements/not_used.rb +278 -0
- data/lib/firewatir/elements/option.rb +131 -0
- data/lib/firewatir/elements/radio_check_common.rb +163 -0
- data/lib/firewatir/elements/select_list.rb +188 -0
- data/lib/firewatir/elements/table.rb +218 -0
- data/lib/firewatir/elements/table_cell.rb +54 -0
- data/lib/firewatir/elements/table_row.rb +100 -0
- data/lib/firewatir/elements/text_field.rb +218 -0
- data/lib/firewatir/exceptions.rb +10 -10
- data/lib/firewatir/firefox.rb +1040 -1127
- data/lib/firewatir/jssh_socket.rb +101 -0
- data/lib/firewatir/version.rb +5 -5
- data/unittests/attach_to_new_window_test.rb +49 -42
- data/unittests/bug_fixes_test.rb +195 -198
- data/unittests/buttons_xpath_test.rb +88 -88
- data/unittests/checkbox_test.rb +158 -155
- data/unittests/checkbox_xpath_test.rb +107 -107
- data/unittests/div_test.rb +275 -276
- data/unittests/filefield_test.rb +49 -45
- data/unittests/filefield_xpath_test.rb +35 -35
- data/unittests/form_test.rb +296 -308
- data/unittests/frame_test.rb +159 -152
- data/unittests/hidden_test.rb +85 -85
- data/unittests/hidden_xpath_test.rb +72 -72
- data/unittests/html/blankpage.html +11 -11
- data/unittests/html/buttons1.html +61 -61
- data/unittests/html/cssTest.html +42 -42
- data/unittests/html/div.html +72 -72
- data/unittests/html/fileupload.html +45 -45
- data/unittests/html/formTest1.html +38 -38
- data/unittests/html/forms2.html +45 -45
- data/unittests/html/frame_buttons.html +3 -3
- data/unittests/html/iframeTest.html +14 -14
- data/unittests/html/iframeTest1.html +13 -13
- data/unittests/html/iframeTest2.html +5 -5
- data/unittests/html/links1.html +42 -42
- data/unittests/html/nestedFrames.html +6 -6
- data/unittests/html/new_browser.html +1 -0
- data/unittests/html/new_browser_popup.html +8 -0
- data/unittests/html/pass.html +9 -9
- data/unittests/html/pre.html +27 -27
- data/unittests/html/redirect.html +10 -10
- data/unittests/html/redirect1.html +8 -8
- data/unittests/html/redirect2.html +8 -8
- data/unittests/html/redirect3.html +8 -8
- data/unittests/html/simple_table_columns.html +74 -74
- data/unittests/html/table1.html +165 -165
- data/unittests/html/textfields1.html +62 -62
- data/unittests/images_test.rb +198 -205
- data/unittests/images_xpath_test.rb +118 -119
- data/unittests/javascript_test.rb +75 -75
- data/unittests/links_test.rb +231 -232
- data/unittests/links_xpath_test.rb +79 -79
- data/unittests/mozilla_all_tests.rb +7 -7
- data/unittests/pre_test.rb +75 -76
- data/unittests/radios_xpath_test.rb +101 -101
- data/unittests/redirect_test.rb +41 -41
- data/unittests/selectbox_test.rb +142 -142
- data/unittests/selectbox_xpath_test.rb +129 -129
- data/unittests/setup.rb +29 -30
- data/unittests/table_test.rb +385 -373
- data/unittests/table_xpath_test.rb +185 -185
- data/unittests/textfields_test.rb +234 -233
- data/unittests/textfields_xpath_test.rb +113 -113
- metadata +33 -11
- data/lib/firewatir/MozillaBaseElement.rb +0 -1863
- data/lib/firewatir/htmlelements.rb +0 -1911
- data/unittests/iostring.rb +0 -30
- data/unittests/iostring_test.rb +0 -48
data/unittests/html/pass.html
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>
|
4
|
-
Pass Page
|
5
|
-
</title>
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
PASS
|
9
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Pass Page
|
5
|
+
</title>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
PASS
|
9
|
+
</body>
|
10
10
|
</html>
|
data/unittests/html/pre.html
CHANGED
@@ -1,28 +1,28 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>PRE tag tests</title>
|
4
|
-
</head>
|
5
|
-
<body>
|
6
|
-
Pre Tag Test
|
7
|
-
<br><br>
|
8
|
-
<pre id='1' name='1'>
|
9
|
-
This is a simple pre space
|
10
|
-
|
11
|
-
it should work well
|
12
|
-
|
13
|
-
just making sure
|
14
|
-
</pre>
|
15
|
-
<hr>
|
16
|
-
<pre id='2' name='2'>
|
17
|
-
<blockquote>
|
18
|
-
A second block
|
19
|
-
good to test with
|
20
|
-
</blockquote>
|
21
|
-
</pre>
|
22
|
-
<hr>
|
23
|
-
<pre id='3' name='3'>
|
24
|
-
this is the last block and it should
|
25
|
-
continue to work no matter what
|
26
|
-
</pre>
|
27
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>PRE tag tests</title>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
Pre Tag Test
|
7
|
+
<br><br>
|
8
|
+
<pre id='1' name='1'>
|
9
|
+
This is a simple pre space
|
10
|
+
|
11
|
+
it should work well
|
12
|
+
|
13
|
+
just making sure
|
14
|
+
</pre>
|
15
|
+
<hr>
|
16
|
+
<pre id='2' name='2'>
|
17
|
+
<blockquote>
|
18
|
+
A second block
|
19
|
+
good to test with
|
20
|
+
</blockquote>
|
21
|
+
</pre>
|
22
|
+
<hr>
|
23
|
+
<pre id='3' name='3'>
|
24
|
+
this is the last block and it should
|
25
|
+
continue to work no matter what
|
26
|
+
</pre>
|
27
|
+
</body>
|
28
28
|
</html>
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Firewatir redirect</title>
|
4
|
-
<meta content="2;div.html">
|
5
|
-
<meta content="2;div.html">
|
6
|
-
<meta content="2;div.html">
|
7
|
-
<meta name="test" content="2;div.html">
|
8
|
-
<meta http-equiv="refresh" content="2;div.html">
|
9
|
-
</head>
|
10
|
-
<body>Transferring to Divs page</body></html>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Firewatir redirect</title>
|
4
|
+
<meta content="2;div.html">
|
5
|
+
<meta content="2;div.html">
|
6
|
+
<meta content="2;div.html">
|
7
|
+
<meta name="test" content="2;div.html">
|
8
|
+
<meta http-equiv="refresh" content="2;div.html">
|
9
|
+
</head>
|
10
|
+
<body>Transferring to Divs page</body></html>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Firewatir redirect</title>
|
4
|
-
<meta content="2;div.html">
|
5
|
-
<meta content="2;div.html">
|
6
|
-
<meta name="test" content="2;div.html">
|
7
|
-
<meta http-equiv="refresh" content="5;redirect2.html">
|
8
|
-
</head>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Firewatir redirect</title>
|
4
|
+
<meta content="2;div.html">
|
5
|
+
<meta content="2;div.html">
|
6
|
+
<meta name="test" content="2;div.html">
|
7
|
+
<meta http-equiv="refresh" content="5;redirect2.html">
|
8
|
+
</head>
|
9
9
|
<body>Transferring to redirect2.html for testing multiple redirects.</body></html>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Firewatir redirect</title>
|
4
|
-
<meta content="2;div.html">
|
5
|
-
<meta content="2;div.html">
|
6
|
-
<meta content="2;div.html">
|
7
|
-
<meta http-equiv="refresh" content="2;redirect3.html">
|
8
|
-
</head>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Firewatir redirect</title>
|
4
|
+
<meta content="2;div.html">
|
5
|
+
<meta content="2;div.html">
|
6
|
+
<meta content="2;div.html">
|
7
|
+
<meta http-equiv="refresh" content="2;redirect3.html">
|
8
|
+
</head>
|
9
9
|
<body>Transferring to redirect3.html for testing multiple redirect.</body></html>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Firewatir redirect</title>
|
4
|
-
<meta content="2;div.html">
|
5
|
-
<meta content="2;div.html">
|
6
|
-
<meta content="2;div.html">
|
7
|
-
<meta http-equiv="refresh" content="2;div.html">
|
8
|
-
</head>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Firewatir redirect</title>
|
4
|
+
<meta content="2;div.html">
|
5
|
+
<meta content="2;div.html">
|
6
|
+
<meta content="2;div.html">
|
7
|
+
<meta http-equiv="refresh" content="2;div.html">
|
8
|
+
</head>
|
9
9
|
<body>Transferring to div.html for testing multiple redirect.</body></html>
|
@@ -1,74 +1,74 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Test page for testing column value extraction </title>
|
4
|
-
</head>
|
5
|
-
<body>
|
6
|
-
CVS Revision: "$Revision: 1.0 $"
|
7
|
-
<br>
|
8
|
-
<br>
|
9
|
-
<b>Test page for testing column value extraction</b>
|
10
|
-
<br>
|
11
|
-
<br>
|
12
|
-
Single Column
|
13
|
-
<table border="1">
|
14
|
-
<tr>
|
15
|
-
<td>R1C1</td>
|
16
|
-
</tr>
|
17
|
-
<tr>
|
18
|
-
<td>R2C1</td>
|
19
|
-
</tr>
|
20
|
-
<tr>
|
21
|
-
<td>R3C1</td>
|
22
|
-
</tr>
|
23
|
-
</table>
|
24
|
-
<br>
|
25
|
-
Multiple Column
|
26
|
-
<table border="1">
|
27
|
-
<tr>
|
28
|
-
<td>R1C1</td>
|
29
|
-
<td>R1C2</td>
|
30
|
-
<td>R1C3</td>
|
31
|
-
</tr>
|
32
|
-
<tr>
|
33
|
-
<td>R2C1</td>
|
34
|
-
<td>R2C2</td>
|
35
|
-
<td>R2C3</td>
|
36
|
-
</tr>
|
37
|
-
<tr>
|
38
|
-
<td>R3C1</td>
|
39
|
-
<td>R3C2</td>
|
40
|
-
<td>R3C3</td>
|
41
|
-
</tr>
|
42
|
-
</table>
|
43
|
-
<br>
|
44
|
-
Multiple Column With Jagged ColSpan
|
45
|
-
<table border="1">
|
46
|
-
<tr>
|
47
|
-
<td>R1C1</td>
|
48
|
-
<td>R1C2</td>
|
49
|
-
<td>R1C3</td>
|
50
|
-
</tr>
|
51
|
-
<tr>
|
52
|
-
<td colspan="2">R2C1</td>
|
53
|
-
<td>R2C2</td>
|
54
|
-
</tr>
|
55
|
-
<tr>
|
56
|
-
<td>R3C1</td>
|
57
|
-
<td>R3C2</td>
|
58
|
-
<td>R3C3</td>
|
59
|
-
</tr>
|
60
|
-
<tr>
|
61
|
-
<td colspan="3">R4C1</td>
|
62
|
-
</tr>
|
63
|
-
<tr>
|
64
|
-
<td rowspan="2">R5C1</td>
|
65
|
-
<td>R5C2</td>
|
66
|
-
<td>R5C3</td>
|
67
|
-
</tr>
|
68
|
-
<tr>
|
69
|
-
<td>R6C2</td>
|
70
|
-
<td>R6C3</td>
|
71
|
-
</tr>
|
72
|
-
</table>
|
73
|
-
</body>
|
74
|
-
</html>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Test page for testing column value extraction </title>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
CVS Revision: "$Revision: 1.0 $"
|
7
|
+
<br>
|
8
|
+
<br>
|
9
|
+
<b>Test page for testing column value extraction</b>
|
10
|
+
<br>
|
11
|
+
<br>
|
12
|
+
Single Column
|
13
|
+
<table border="1">
|
14
|
+
<tr>
|
15
|
+
<td>R1C1</td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td>R2C1</td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td>R3C1</td>
|
22
|
+
</tr>
|
23
|
+
</table>
|
24
|
+
<br>
|
25
|
+
Multiple Column
|
26
|
+
<table border="1">
|
27
|
+
<tr>
|
28
|
+
<td>R1C1</td>
|
29
|
+
<td>R1C2</td>
|
30
|
+
<td>R1C3</td>
|
31
|
+
</tr>
|
32
|
+
<tr>
|
33
|
+
<td>R2C1</td>
|
34
|
+
<td>R2C2</td>
|
35
|
+
<td>R2C3</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>R3C1</td>
|
39
|
+
<td>R3C2</td>
|
40
|
+
<td>R3C3</td>
|
41
|
+
</tr>
|
42
|
+
</table>
|
43
|
+
<br>
|
44
|
+
Multiple Column With Jagged ColSpan
|
45
|
+
<table border="1">
|
46
|
+
<tr>
|
47
|
+
<td>R1C1</td>
|
48
|
+
<td>R1C2</td>
|
49
|
+
<td>R1C3</td>
|
50
|
+
</tr>
|
51
|
+
<tr>
|
52
|
+
<td colspan="2">R2C1</td>
|
53
|
+
<td>R2C2</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td>R3C1</td>
|
57
|
+
<td>R3C2</td>
|
58
|
+
<td>R3C3</td>
|
59
|
+
</tr>
|
60
|
+
<tr>
|
61
|
+
<td colspan="3">R4C1</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td rowspan="2">R5C1</td>
|
65
|
+
<td>R5C2</td>
|
66
|
+
<td>R5C3</td>
|
67
|
+
</tr>
|
68
|
+
<tr>
|
69
|
+
<td>R6C2</td>
|
70
|
+
<td>R6C3</td>
|
71
|
+
</tr>
|
72
|
+
</table>
|
73
|
+
</body>
|
74
|
+
</html>
|
data/unittests/html/table1.html
CHANGED
@@ -1,165 +1,165 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>
|
4
|
-
Test page for Tables
|
5
|
-
</title>
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
|
9
|
-
<script language=javascript>
|
10
|
-
|
11
|
-
function addRow() {
|
12
|
-
|
13
|
-
var tbody = document.getElementById('t1' ).getElementsByTagName("TBODY")[0];
|
14
|
-
|
15
|
-
// Create a TR
|
16
|
-
var row = document.createElement("TR");
|
17
|
-
row.setAttribute("class", "normal");
|
18
|
-
row.setAttribute("border", "1");
|
19
|
-
|
20
|
-
for (j=0 ; j < document.getElementById('t1' ).rows[1].cells.length; j++) {
|
21
|
-
// Create a TD
|
22
|
-
var td = document.createElement("TD");
|
23
|
-
td.setAttribute("border","1");
|
24
|
-
td.innerHTML = "New Cell";
|
25
|
-
|
26
|
-
// Assign TD to TR and then assign TR to TBODY
|
27
|
-
row.appendChild(td);
|
28
|
-
}
|
29
|
-
tbody.appendChild(row);
|
30
|
-
}
|
31
|
-
|
32
|
-
</script>
|
33
|
-
|
34
|
-
|
35
|
-
CVS Revision: "$Revision: 1.0 $"
|
36
|
-
<br>
|
37
|
-
<br>
|
38
|
-
<table border="1" id='tblTest' cellspacing="3" cellpadding="6" class="TableClass">
|
39
|
-
<tr>
|
40
|
-
<td> Row 1 Col1</td>
|
41
|
-
<td> Row 1 Col2</td>
|
42
|
-
</tr> <tr>
|
43
|
-
<td> Row 2 Col1</td>
|
44
|
-
<td> Row 2 Col2</td>
|
45
|
-
</tr>
|
46
|
-
</table>
|
47
|
-
|
48
|
-
|
49
|
-
<br>
|
50
|
-
<br>
|
51
|
-
<table id= 't1'>
|
52
|
-
<Tr><td id=cell_with_colspan colspan=2>Table 2
|
53
|
-
<tr>
|
54
|
-
<td id=cell1> Row 1 Col1</td>
|
55
|
-
<td> Row 1 Col2</td>
|
56
|
-
</tr>
|
57
|
-
<tr id=row1>
|
58
|
-
<td> Row 2 Col1</td>
|
59
|
-
<td> Row 2 Col2</td>
|
60
|
-
</tr>
|
61
|
-
<tr>
|
62
|
-
<td> Row 3 Col1</td>
|
63
|
-
<td> Row 3 Col2</td>
|
64
|
-
</tr>
|
65
|
-
<tr>
|
66
|
-
<td> Row 4 Col1</td>
|
67
|
-
<td> Row 4 Col2</td>
|
68
|
-
</tr>
|
69
|
-
</table>
|
70
|
-
<br>
|
71
|
-
<input type=button value='add row' onClick='javascript:addRow()'>
|
72
|
-
|
73
|
-
<br>
|
74
|
-
<br>
|
75
|
-
|
76
|
-
The following has a nested table
|
77
|
-
<table id='t2' border=1>
|
78
|
-
<tr>
|
79
|
-
<td>
|
80
|
-
cell 1</td>
|
81
|
-
<td>
|
82
|
-
cell2</td>
|
83
|
-
</tr>
|
84
|
-
<tr>
|
85
|
-
<td>
|
86
|
-
<table><tr><td>nest1</td><td>nest2</td></tr></table>
|
87
|
-
</td>
|
88
|
-
<td>
|
89
|
-
Normal
|
90
|
-
</td>
|
91
|
-
</tr>
|
92
|
-
</table>
|
93
|
-
<br>
|
94
|
-
This table has 3 body tags.
|
95
|
-
<br><br>
|
96
|
-
<table id=body_test>
|
97
|
-
<THEAD>
|
98
|
-
<TR>
|
99
|
-
<TD>
|
100
|
-
This text is in the THEAD.
|
101
|
-
</TD>
|
102
|
-
</TR>
|
103
|
-
</THEAD>
|
104
|
-
<TBODY>
|
105
|
-
<TR>
|
106
|
-
<TD>
|
107
|
-
This text is in the FRST TBODY.
|
108
|
-
</TD>
|
109
|
-
</TR>
|
110
|
-
</TBODY>
|
111
|
-
|
112
|
-
<TBODY>
|
113
|
-
<TR>
|
114
|
-
<TD>
|
115
|
-
This text is in the SECOND TBODY.
|
116
|
-
</TD>
|
117
|
-
</TR>
|
118
|
-
<TR>
|
119
|
-
<TD>
|
120
|
-
This text is also in the SECOND TBODY.
|
121
|
-
</TD>
|
122
|
-
</TR>
|
123
|
-
</TBODY>
|
124
|
-
|
125
|
-
<TBODY>
|
126
|
-
<TR>
|
127
|
-
<TD>
|
128
|
-
This text is in the THIRD TBODY.
|
129
|
-
</TD>
|
130
|
-
</TR>
|
131
|
-
</TBODY>
|
132
|
-
|
133
|
-
</TABLE>
|
134
|
-
|
135
|
-
<table border="1" id=pic_table>
|
136
|
-
<tr>
|
137
|
-
<td> A picture is in the next cell</td>
|
138
|
-
<td><img src=images/circle.jpg></td>
|
139
|
-
</tr><tr>
|
140
|
-
<td> A link is in the next cell</td>
|
141
|
-
<td><a href = http://google.com>Google</a></td>
|
142
|
-
</tr>
|
143
|
-
</table>
|
144
|
-
Table to string test
|
145
|
-
<table border="1" id='tblTest1' cellspacing="3" cellpadding="6" class="TableClass">
|
146
|
-
<tr><td id=cellwithcolspan colspan=2>Table 3</td></tr>
|
147
|
-
<tr>
|
148
|
-
<td id=cell1> Row 1 Col1</td>
|
149
|
-
<td> Row 1 Col2</td>
|
150
|
-
</tr>
|
151
|
-
<tr id=row1>
|
152
|
-
<td> Row 2 Col1</td>
|
153
|
-
<td> Row 2 Col2</td>
|
154
|
-
</tr>
|
155
|
-
<tr>
|
156
|
-
<td> Row 3 Col1</td>
|
157
|
-
<td> Row 3 Col2</td>
|
158
|
-
</tr>
|
159
|
-
<tr>
|
160
|
-
<td> Row 4 Col1</td>
|
161
|
-
<td> Row 4 Col2</td>
|
162
|
-
</tr>
|
163
|
-
</table>
|
164
|
-
</body>
|
165
|
-
</html>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for Tables
|
5
|
+
</title>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
|
9
|
+
<script language=javascript>
|
10
|
+
|
11
|
+
function addRow() {
|
12
|
+
|
13
|
+
var tbody = document.getElementById('t1' ).getElementsByTagName("TBODY")[0];
|
14
|
+
|
15
|
+
// Create a TR
|
16
|
+
var row = document.createElement("TR");
|
17
|
+
row.setAttribute("class", "normal");
|
18
|
+
row.setAttribute("border", "1");
|
19
|
+
|
20
|
+
for (j=0 ; j < document.getElementById('t1' ).rows[1].cells.length; j++) {
|
21
|
+
// Create a TD
|
22
|
+
var td = document.createElement("TD");
|
23
|
+
td.setAttribute("border","1");
|
24
|
+
td.innerHTML = "New Cell";
|
25
|
+
|
26
|
+
// Assign TD to TR and then assign TR to TBODY
|
27
|
+
row.appendChild(td);
|
28
|
+
}
|
29
|
+
tbody.appendChild(row);
|
30
|
+
}
|
31
|
+
|
32
|
+
</script>
|
33
|
+
|
34
|
+
|
35
|
+
CVS Revision: "$Revision: 1.0 $"
|
36
|
+
<br>
|
37
|
+
<br>
|
38
|
+
<table border="1" id='tblTest' cellspacing="3" cellpadding="6" class="TableClass">
|
39
|
+
<tr>
|
40
|
+
<td> Row 1 Col1</td>
|
41
|
+
<td> Row 1 Col2</td>
|
42
|
+
</tr> <tr>
|
43
|
+
<td> Row 2 Col1</td>
|
44
|
+
<td> Row 2 Col2</td>
|
45
|
+
</tr>
|
46
|
+
</table>
|
47
|
+
|
48
|
+
|
49
|
+
<br>
|
50
|
+
<br>
|
51
|
+
<table id= 't1'>
|
52
|
+
<Tr><td id=cell_with_colspan colspan=2>Table 2
|
53
|
+
<tr>
|
54
|
+
<td id=cell1> Row 1 Col1</td>
|
55
|
+
<td> Row 1 Col2</td>
|
56
|
+
</tr>
|
57
|
+
<tr id=row1>
|
58
|
+
<td> Row 2 Col1</td>
|
59
|
+
<td> Row 2 Col2</td>
|
60
|
+
</tr>
|
61
|
+
<tr>
|
62
|
+
<td> Row 3 Col1</td>
|
63
|
+
<td> Row 3 Col2</td>
|
64
|
+
</tr>
|
65
|
+
<tr>
|
66
|
+
<td> Row 4 Col1</td>
|
67
|
+
<td> Row 4 Col2</td>
|
68
|
+
</tr>
|
69
|
+
</table>
|
70
|
+
<br>
|
71
|
+
<input type=button value='add row' onClick='javascript:addRow()'>
|
72
|
+
|
73
|
+
<br>
|
74
|
+
<br>
|
75
|
+
|
76
|
+
The following has a nested table
|
77
|
+
<table id='t2' border=1>
|
78
|
+
<tr>
|
79
|
+
<td>
|
80
|
+
cell 1</td>
|
81
|
+
<td>
|
82
|
+
cell2</td>
|
83
|
+
</tr>
|
84
|
+
<tr>
|
85
|
+
<td>
|
86
|
+
<table><tr><td>nest1</td><td>nest2</td></tr></table>
|
87
|
+
</td>
|
88
|
+
<td>
|
89
|
+
Normal
|
90
|
+
</td>
|
91
|
+
</tr>
|
92
|
+
</table>
|
93
|
+
<br>
|
94
|
+
This table has 3 body tags.
|
95
|
+
<br><br>
|
96
|
+
<table id=body_test>
|
97
|
+
<THEAD>
|
98
|
+
<TR>
|
99
|
+
<TD>
|
100
|
+
This text is in the THEAD.
|
101
|
+
</TD>
|
102
|
+
</TR>
|
103
|
+
</THEAD>
|
104
|
+
<TBODY>
|
105
|
+
<TR>
|
106
|
+
<TD>
|
107
|
+
This text is in the FRST TBODY.
|
108
|
+
</TD>
|
109
|
+
</TR>
|
110
|
+
</TBODY>
|
111
|
+
|
112
|
+
<TBODY>
|
113
|
+
<TR>
|
114
|
+
<TD>
|
115
|
+
This text is in the SECOND TBODY.
|
116
|
+
</TD>
|
117
|
+
</TR>
|
118
|
+
<TR>
|
119
|
+
<TD>
|
120
|
+
This text is also in the SECOND TBODY.
|
121
|
+
</TD>
|
122
|
+
</TR>
|
123
|
+
</TBODY>
|
124
|
+
|
125
|
+
<TBODY>
|
126
|
+
<TR>
|
127
|
+
<TD>
|
128
|
+
This text is in the THIRD TBODY.
|
129
|
+
</TD>
|
130
|
+
</TR>
|
131
|
+
</TBODY>
|
132
|
+
|
133
|
+
</TABLE>
|
134
|
+
|
135
|
+
<table border="1" id=pic_table>
|
136
|
+
<tr>
|
137
|
+
<td> A picture is in the next cell</td>
|
138
|
+
<td><img src=images/circle.jpg></td>
|
139
|
+
</tr><tr>
|
140
|
+
<td> A link is in the next cell</td>
|
141
|
+
<td><a href = http://google.com>Google</a></td>
|
142
|
+
</tr>
|
143
|
+
</table>
|
144
|
+
Table to string test
|
145
|
+
<table border="1" id='tblTest1' cellspacing="3" cellpadding="6" class="TableClass">
|
146
|
+
<tr><td id=cellwithcolspan colspan=2>Table 3</td></tr>
|
147
|
+
<tr>
|
148
|
+
<td id=cell1> Row 1 Col1</td>
|
149
|
+
<td> Row 1 Col2</td>
|
150
|
+
</tr>
|
151
|
+
<tr id=row1>
|
152
|
+
<td> Row 2 Col1</td>
|
153
|
+
<td> Row 2 Col2</td>
|
154
|
+
</tr>
|
155
|
+
<tr>
|
156
|
+
<td> Row 3 Col1</td>
|
157
|
+
<td> Row 3 Col2</td>
|
158
|
+
</tr>
|
159
|
+
<tr>
|
160
|
+
<td> Row 4 Col1</td>
|
161
|
+
<td> Row 4 Col2</td>
|
162
|
+
</tr>
|
163
|
+
</table>
|
164
|
+
</body>
|
165
|
+
</html>
|