firewatir 1.1.1
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/MozillaBaseElement.rb +1778 -0
- data/container.rb +889 -0
- data/firewatir/exceptions.rb +44 -0
- data/firewatir/testUnitAddons.rb +8 -0
- data/firewatir.rb +1130 -0
- data/htmlelements.rb +2277 -0
- data/unittests/attach_to_new_window_test.rb +34 -0
- data/unittests/bug_fixes_test.rb +188 -0
- data/unittests/buttons_test.rb +215 -0
- data/unittests/buttons_xpath_test.rb +87 -0
- data/unittests/checkbox_test.rb +154 -0
- data/unittests/checkbox_xpath_test.rb +107 -0
- data/unittests/div_test.rb +274 -0
- data/unittests/filefield_test.rb +45 -0
- data/unittests/filefield_xpath_test.rb +35 -0
- data/unittests/form_test.rb +307 -0
- data/unittests/frame_test.rb +151 -0
- data/unittests/hidden_test.rb +85 -0
- data/unittests/hidden_xpath_test.rb +72 -0
- data/unittests/html/JavascriptClick.html +42 -0
- data/unittests/html/blankpage.html +12 -0
- data/unittests/html/buttons1.html +61 -0
- data/unittests/html/checkboxes1.html +71 -0
- data/unittests/html/complex_table.html +36 -0
- data/unittests/html/cssTest.html +42 -0
- data/unittests/html/div.html +72 -0
- data/unittests/html/div_xml.html +21 -0
- data/unittests/html/fileupload.html +45 -0
- data/unittests/html/formTest1.html +39 -0
- data/unittests/html/forms2.html +45 -0
- data/unittests/html/forms3.html +132 -0
- data/unittests/html/forms4.html +27 -0
- data/unittests/html/frame_buttons.html +4 -0
- data/unittests/html/frame_links.html +4 -0
- data/unittests/html/frame_multi.html +5 -0
- data/unittests/html/iframeTest.html +15 -0
- data/unittests/html/iframeTest1.html +14 -0
- data/unittests/html/iframeTest2.html +6 -0
- data/unittests/html/images/1.gif +0 -0
- data/unittests/html/images/2.GIF +0 -0
- data/unittests/html/images/3.GIF +0 -0
- data/unittests/html/images/button.jpg +0 -0
- data/unittests/html/images/circle.jpg +0 -0
- data/unittests/html/images/minus.GIF +0 -0
- data/unittests/html/images/originaltriangle.jpg +0 -0
- data/unittests/html/images/plus.gif +0 -0
- data/unittests/html/images/square.jpg +0 -0
- data/unittests/html/images/triangle.jpg +0 -0
- data/unittests/html/images1.html +67 -0
- data/unittests/html/javascriptevents.html +35 -0
- data/unittests/html/link_pass.html +11 -0
- data/unittests/html/links1.html +42 -0
- data/unittests/html/links2.html +11 -0
- data/unittests/html/modal_dialog.html +8 -0
- data/unittests/html/modal_dialog_launcher.html +12 -0
- data/unittests/html/nestedFrames.html +6 -0
- data/unittests/html/new_browser.html +17 -0
- data/unittests/html/pass.html +10 -0
- data/unittests/html/popups1.html +60 -0
- data/unittests/html/pre.html +28 -0
- data/unittests/html/radioButtons1.html +71 -0
- data/unittests/html/redirect.html +10 -0
- data/unittests/html/redirect1.html +9 -0
- data/unittests/html/redirect2.html +9 -0
- data/unittests/html/redirect3.html +9 -0
- data/unittests/html/select_tealeaf.html +54 -0
- data/unittests/html/selectboxes1.html +55 -0
- data/unittests/html/simple_table.html +26 -0
- data/unittests/html/simple_table_buttons.html +104 -0
- data/unittests/html/simple_table_columns.html +74 -0
- data/unittests/html/table1.html +165 -0
- data/unittests/html/tableCell_using_xpath.html +19 -0
- data/unittests/html/textarea.html +30 -0
- data/unittests/html/textfields1.html +62 -0
- data/unittests/html/textsearch.html +44 -0
- data/unittests/images_test.rb +204 -0
- data/unittests/images_xpath_test.rb +118 -0
- data/unittests/iostring.rb +30 -0
- data/unittests/iostring_test.rb +48 -0
- data/unittests/javascript_test.rb +71 -0
- data/unittests/links_test.rb +230 -0
- data/unittests/links_xpath_test.rb +79 -0
- data/unittests/mozilla_all_tests.rb +18 -0
- data/unittests/pre_test.rb +74 -0
- data/unittests/radios_test.rb +166 -0
- data/unittests/radios_xpath_test.rb +101 -0
- data/unittests/redirect_test.rb +40 -0
- data/unittests/selectbox_test.rb +141 -0
- data/unittests/selectbox_xpath_test.rb +127 -0
- data/unittests/setup.rb +35 -0
- data/unittests/table_test.rb +372 -0
- data/unittests/table_xpath_test.rb +184 -0
- data/unittests/textfields_test.rb +230 -0
- data/unittests/textfields_xpath_test.rb +112 -0
- metadata +144 -0
Binary file
|
Binary file
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for Images
|
5
|
+
</title>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
CVS Revision: "$Revision 1.0$"
|
9
|
+
|
10
|
+
<script>
|
11
|
+
function disableimage(){
|
12
|
+
if (document.all.disabler_test.disabled==true){
|
13
|
+
document.all.disabler_test.disabled = false;
|
14
|
+
document.all.disable_img.value = 'Click To Disable';
|
15
|
+
} else {
|
16
|
+
document.all.disabler_test.disabled = true;
|
17
|
+
document.all.disable_img.value = 'Click To Enable';
|
18
|
+
}
|
19
|
+
}
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<br>
|
23
|
+
<br>
|
24
|
+
<table>
|
25
|
+
<tr>
|
26
|
+
<td>
|
27
|
+
<img src = images/triangle.jpg>
|
28
|
+
<td> The triangle only has a src
|
29
|
+
|
30
|
+
<tr>
|
31
|
+
<td>
|
32
|
+
<img src = images/square.jpg id=square title="square_image">
|
33
|
+
<td> The square has a src and an id
|
34
|
+
|
35
|
+
<tr>
|
36
|
+
<td>
|
37
|
+
<img src = images/circle.jpg name = circle>
|
38
|
+
<td> The circle has a src and a name
|
39
|
+
|
40
|
+
|
41
|
+
<tr>
|
42
|
+
<td>
|
43
|
+
<img src = images/missing.jpg name = themissingimage>
|
44
|
+
<td> this is a missing image
|
45
|
+
|
46
|
+
|
47
|
+
<tr>
|
48
|
+
<td>
|
49
|
+
<img src = images/button.jpg onClick='javascript:document.location="pass.html";' name='disabler_test' >
|
50
|
+
<td> this image has a javascript on click event
|
51
|
+
<br>
|
52
|
+
CLick to make it a disabled image - so the javascript doesnt fire<input type=button value='Click To Disable' onClick='javascript:disableimage();' name=disable_img >
|
53
|
+
|
54
|
+
<tr>
|
55
|
+
<td>
|
56
|
+
<img src = images/circle.jpg alt="circle">
|
57
|
+
<td> The circle has a src and an alt text
|
58
|
+
|
59
|
+
<tr><td>
|
60
|
+
<INPUT onClick= javascript:document.all.text1.value='clicked' type=image src="images/square.jpg" value="Position Show Optional" name=tsogpsb>
|
61
|
+
<td> This is a button as an image, with a value attribute
|
62
|
+
<input type = text name = text1>
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<HTML>
|
2
|
+
<HEAD>
|
3
|
+
<SCRIPT LANGUAGE="JavaScript">
|
4
|
+
|
5
|
+
function enable() {
|
6
|
+
frm=document.forms[0]
|
7
|
+
{frm.Button1.disabled=false}
|
8
|
+
}
|
9
|
+
|
10
|
+
</SCRIPT>
|
11
|
+
</HEAD>
|
12
|
+
<BODY TEXT="000000" BGCOLOR="FFFFFF">
|
13
|
+
<p align="center">
|
14
|
+
<form>
|
15
|
+
|
16
|
+
<input type="text" name="entertext" onkeyup="javascript:enable();" ></input>
|
17
|
+
<input type="button" value="Button 1" name="Button1" disabled="true" onClick="javascript:document.location='pass.html';"></input>
|
18
|
+
|
19
|
+
</form>
|
20
|
+
</p>
|
21
|
+
<p>
|
22
|
+
<a href="pass.html"
|
23
|
+
onMouseOver="window.status='It worked'; return true">Check the Status</a>
|
24
|
+
</p>
|
25
|
+
<p>
|
26
|
+
<a href="pass.html"
|
27
|
+
onMouseOver="window.status=''; return true">Clear the Status</a>
|
28
|
+
|
29
|
+
</p>
|
30
|
+
|
31
|
+
<p>
|
32
|
+
<a href = '#' onClick= "javascript:window.open('pass.html','pop_up_test','height=100,width=50,fullscreen=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); ">New Window No Status Bar</a>
|
33
|
+
</p>
|
34
|
+
</BODY>
|
35
|
+
</HTML>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Test page for Links</title>
|
4
|
+
<link rel="stylesheet" type="text/css" href="firewatir_unit_tests.css"></link>
|
5
|
+
</head>
|
6
|
+
|
7
|
+
<body>
|
8
|
+
CVS Revision: $Revision 1.0 $
|
9
|
+
<br></br>
|
10
|
+
<br></br>
|
11
|
+
<table>
|
12
|
+
<tbody>
|
13
|
+
<tr>
|
14
|
+
<td> <a href="links2.html">test1</a> <br></br>
|
15
|
+
<a href="link_pass.html" class="link_class_1">test1</a> <br></br>
|
16
|
+
<a href="pass3.html"><img src="images/button.jpg" border="0" alt=""></img></a> The button is really a link <br></br>
|
17
|
+
<a href="textarea.html" target="_blank">new window</a> <a href="textarea.html" target="_blank">new window</a> </td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td> <a href="links1.HTML" id="link_id">Link Using an ID</a> </td>
|
21
|
+
</tr>
|
22
|
+
<tr>
|
23
|
+
<td> <a href="links1.HTML" name="link_name">Link Using a name</a>
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
<tr>
|
27
|
+
<td> <a href="links1.HTML" title="link_title">Link Using a title</a>
|
28
|
+
</td>
|
29
|
+
</tr>
|
30
|
+
|
31
|
+
<tr>
|
32
|
+
<td><a href = "pass.html"><img src="images/triangle.jpg" alt=""></img>Image and a text link</a></td>
|
33
|
+
</tr>
|
34
|
+
|
35
|
+
</tbody>
|
36
|
+
</table>
|
37
|
+
|
38
|
+
<a id="linktos" href="link_pass.html" class="link_class_1">to string test</a> <br></br>
|
39
|
+
|
40
|
+
<a href="link1.html" name="test_link"><span class="spanClass">name<span class="delete">Delet</span></span</a>
|
41
|
+
</body>
|
42
|
+
</html>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Modal Browser Dialog Launcher</title>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
<h1>Modal Browser Dialog Launcher</h1>
|
7
|
+
<input type = "button" value = "Launch Dialog" onclick = "javascript:document.all.modaloutput.value=window.showModalDialog('modal_dialog.html');"></input>
|
8
|
+
<br></br>
|
9
|
+
<p>Text from Modal:</p>
|
10
|
+
<input type = "text" name = "modaloutput"></input>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>New Browser Launcher</title>
|
4
|
+
<script language="JavaScript" type="">
|
5
|
+
function open_window_slowly(){
|
6
|
+
setTimeout("window.open('blankpage.html');", document.all.delay.value * 1000);
|
7
|
+
}
|
8
|
+
</script>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<h1>New Browser Launcher</h1>
|
12
|
+
<p>This link brings up a window marked "pass": <a href="pass.html" target="_blank">New Window</a></p>
|
13
|
+
<p>This link brings up a window marked "blank for frames" after a delay:
|
14
|
+
<span onclick="open_window_slowly();">New Window Slowly</span></p>
|
15
|
+
<p> Number of seconds to wait: <input type="text" name="delay" value="0.5"></input></p>
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,60 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for pop ups
|
5
|
+
</title>
|
6
|
+
|
7
|
+
<script language = javascript>
|
8
|
+
function doConfirmBox() {
|
9
|
+
var a =confirm('Do you really want to do this');
|
10
|
+
if (a == true)
|
11
|
+
document.all.confirmtext.value = "OK"
|
12
|
+
else
|
13
|
+
document.all.confirmtext.value = "Cancel";
|
14
|
+
}
|
15
|
+
|
16
|
+
function doPromptBox() {
|
17
|
+
var a =prompt('Enter something delightful' , '');
|
18
|
+
if (a == null)
|
19
|
+
document.all.prompttext.value = "Cancel"
|
20
|
+
else
|
21
|
+
document.all.prompttext.value = a;
|
22
|
+
}
|
23
|
+
|
24
|
+
|
25
|
+
</script>
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
CVS Revision: "$Revision: 1.0 $"
|
30
|
+
<br>
|
31
|
+
<br>
|
32
|
+
<table>
|
33
|
+
|
34
|
+
<tr>
|
35
|
+
<td>
|
36
|
+
<input type = button value = "Alert" onClick = "javascript:alert('This is an alert box');">This Button shows an alert pop up</q>
|
37
|
+
<br>
|
38
|
+
|
39
|
+
<tr>
|
40
|
+
<td>
|
41
|
+
<input type = button value = "Prompt" onClick= "javascript:doPromptBox();">This button shows a prompt pop up. This text box shows what text was entered <input type = text name = prompttext>
|
42
|
+
|
43
|
+
<br>
|
44
|
+
<tr>
|
45
|
+
<td>
|
46
|
+
<input type = button value = "Confirm" onClick= "javascript:doConfirmBox();">This button shows a prompt pop up. This text box shows which button was clicked <input type = text name = confirmtext>
|
47
|
+
<br>
|
48
|
+
|
49
|
+
<tr>
|
50
|
+
<td>
|
51
|
+
<input type = file name = up>This button shows a file upload box</q>
|
52
|
+
<br>
|
53
|
+
|
54
|
+
|
55
|
+
<tr>
|
56
|
+
<td>
|
57
|
+
</table>
|
58
|
+
|
59
|
+
|
60
|
+
</html>
|
@@ -0,0 +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>
|
28
|
+
</html>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for Radio Buttons
|
5
|
+
</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="firewatir_unit_tests.css">
|
7
|
+
<script>
|
8
|
+
|
9
|
+
function setButtonState( )
|
10
|
+
{
|
11
|
+
if (document.all.foo.disabled )
|
12
|
+
document.all.foo.disabled = false
|
13
|
+
else
|
14
|
+
document.all.foo.disabled = true
|
15
|
+
}
|
16
|
+
</script>
|
17
|
+
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
CVS Revision: $Revision $
|
21
|
+
<br>
|
22
|
+
<br>
|
23
|
+
<table>
|
24
|
+
<tr>
|
25
|
+
<td>
|
26
|
+
Radio (using name) <input type = radio name = box1 class='radio_style'>
|
27
|
+
<br>
|
28
|
+
Radio (using id) <input type = radio id = box5>
|
29
|
+
|
30
|
+
<tr>
|
31
|
+
<td>
|
32
|
+
Disabled<input type = radio name = box2 disabled>
|
33
|
+
|
34
|
+
<tr>
|
35
|
+
<td>
|
36
|
+
Set<input type = radio name = box3 checked>
|
37
|
+
|
38
|
+
<tr>
|
39
|
+
<td>
|
40
|
+
<br>
|
41
|
+
<br>
|
42
|
+
These radios have the same name, but different values
|
43
|
+
<br>
|
44
|
+
Name = box4 value=1 <input type = radio name = box4 value = 1 checked>
|
45
|
+
<br>
|
46
|
+
Name = box4 value=2 <input type = radio name = box4 value = 2>
|
47
|
+
<br>
|
48
|
+
Name = box4 value=3 <input type = radio name = box4 value = 3>
|
49
|
+
<br>
|
50
|
+
Name = box4 value=4 <input type = radio name = box4 value = 4>
|
51
|
+
<br>
|
52
|
+
Name = box4 value=5 <input type = radio name = box4 value = 5 disabled title="box4-value5">
|
53
|
+
|
54
|
+
|
55
|
+
<tr>
|
56
|
+
<td>
|
57
|
+
Name = box5 value=1 Enable Button <input type = radio name = box5 value = 1 onClick='javascript:setButtonState( )'>
|
58
|
+
<br>Name = box5 value=2 Disable Button<input type = radio name = box5 value = 2 onClick='javascript:setButtonState( )'>
|
59
|
+
|
60
|
+
|
61
|
+
<tr>
|
62
|
+
<td>
|
63
|
+
<input type = button name = foo value = foo disabled><td> This button is used with radio box5. This button gets enabled/disabled on each click
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
</table>
|
70
|
+
</body>
|
71
|
+
</html>
|
@@ -0,0 +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>
|
@@ -0,0 +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>
|
9
|
+
<body>Transferring to redirect2.html for testing multiple redirects.</body></html>
|
@@ -0,0 +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>
|
9
|
+
<body>Transferring to redirect3.html for testing multiple redirect.</body></html>
|
@@ -0,0 +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>
|
9
|
+
<body>Transferring to div.html for testing multiple redirect.</body></html>
|
@@ -0,0 +1,54 @@
|
|
1
|
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
</head>
|
5
|
+
<body>
|
6
|
+
I've been very happy to be able to start migrating from Incanica's ITP<br>
|
7
|
+
to Watir at work, but I've run into my first real problem. I have a<br>
|
8
|
+
select box defined thus:<br>
|
9
|
+
<br>
|
10
|
+
<select class="body" name="op_numhits">
|
11
|
+
<option value="0">=</option>
|
12
|
+
<option value="1"><></option>
|
13
|
+
<option value="3">>=</option>
|
14
|
+
<option value="5"><=</option>
|
15
|
+
</select>
|
16
|
+
<br>
|
17
|
+
and I'm trying to choose the ">=" option via the following code:<br>
|
18
|
+
<pre> $ie.selectBox( :name, "op_numhits" ).select( ">=" )</pre>
|
19
|
+
(Aside: actually, what I write to define the task is XML adapted from
|
20
|
+
ITP's syntax, e.g.,<br>
|
21
|
+
<pre> <browser_action entity="selectBox" entity_id_type="name" entity_id_value="op_numhits" action="select" param="&gt;=" /> </pre>
|
22
|
+
and our WebSiteTester Ruby class translates that into
|
23
|
+
Watir calls.)<br>
|
24
|
+
<br>
|
25
|
+
and the output I get from Watir is:<br>
|
26
|
+
<br>
|
27
|
+
Setting box op_numhits to >= String<br>
|
28
|
+
comparing >= to á=áá<br>
|
29
|
+
comparing >= to á<>á<br>
|
30
|
+
comparing >= to á>=á<br>
|
31
|
+
comparing >= to á<=á<br>
|
32
|
+
<br>
|
33
|
+
<br>
|
34
|
+
While I just realized I could enhance our WebSiteTester class to be
|
35
|
+
able to pass Regexp's as well as Strings to the select() method, it
|
36
|
+
would also be nice to be able to specify the desired select option by
|
37
|
+
value (in my example, the value is "3").<br>
|
38
|
+
<hr><br>
|
39
|
+
Is it even possible for Watir to select something based on an attribute<br>
|
40
|
+
that's empty, like the first option of the select box below? I know I<br>
|
41
|
+
also have an issue given that I'm translating from an XML representation<br>
|
42
|
+
to a Ruby Watir call, and I'm probably getting a nil back from REXML<br>
|
43
|
+
when I ask for the value of an attribute that has nothing between the<br>
|
44
|
+
quotes....<br>
|
45
|
+
<br>
|
46
|
+
<select class="body" name="s_interest" id="s_interest">
|
47
|
+
<option value="" selected="Y"></option>
|
48
|
+
<option value="-1">Yes</option>
|
49
|
+
<option value="0">No</option>
|
50
|
+
</select>
|
51
|
+
<br>
|
52
|
+
<br>
|
53
|
+
</body>
|
54
|
+
</html>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for select boxes
|
5
|
+
</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<script language="javascript">
|
10
|
+
function changeLocation()
|
11
|
+
{
|
12
|
+
document.location.href = "pass.html";
|
13
|
+
}
|
14
|
+
function show_alert()
|
15
|
+
{
|
16
|
+
textbox = document.getElementById('txtAlert');
|
17
|
+
alert("Press OK")
|
18
|
+
textbox.value = "You pressed OK button";
|
19
|
+
}
|
20
|
+
</script>
|
21
|
+
CVS Revision: $Revision: 1.0 $
|
22
|
+
<br>
|
23
|
+
<br>
|
24
|
+
<table>
|
25
|
+
|
26
|
+
<tr>
|
27
|
+
<td>
|
28
|
+
<select name = sel1 class='list_style'>
|
29
|
+
<option value=o1 >Option 1</option><option value=o2 >Option 2</option><option value=o3 SELECTED >Option 3</option><option value=o4 >Option 4</option></select></td></tr>
|
30
|
+
<tr>
|
31
|
+
<td>
|
32
|
+
<select name = sel2 multiple>
|
33
|
+
<option value=o1 >Option 1</option><option value=o2 class='option_style'>Option 2</option><option value=o3 class='option_style' SELECTED >Option 3</option><option value=o4 class='option_style'>Option 4</option><option value=o6 class='option_style'>Option 5</option><option value=o6 class='option_style' SELECTED >Option 6</option></select></td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td>
|
37
|
+
<select name = sel3 onChange = 'changeLocation();'>
|
38
|
+
<option value = o1>Option 1</option><option value = o2>Option 2</option><option value = o3 selected>Option 3</option><option value = o4>Option 4</option></select></td>
|
39
|
+
|
40
|
+
<td> This box is used for testing the onchange event
|
41
|
+
</td></tr>
|
42
|
+
<tr>
|
43
|
+
<td><select id = 'selectbox_4' disabled><option value = o1>Option 1</option><option value = o2>Option 2</option>
|
44
|
+
</td>
|
45
|
+
<td>This box has an id</td></tr>
|
46
|
+
<tr>
|
47
|
+
<td><select id= 'selectbox_5' onchange='show_alert();'><option value = o1>Option 1</option><option value = o2>Option 2</option></select></td><td>
|
48
|
+
<input id='txtAlert'>
|
49
|
+
</td></tr>
|
50
|
+
</table>
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
</body>
|
55
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for Tables
|
5
|
+
</title>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
CVS Revision: "$Revision: 1.0 $"
|
9
|
+
<br>
|
10
|
+
<br>
|
11
|
+
<table >
|
12
|
+
<tr>
|
13
|
+
<td> Row 1 Col1 </td>
|
14
|
+
<td> Row 1 Col2 </td>
|
15
|
+
</tr>
|
16
|
+
<tr>
|
17
|
+
<td> Row 2 Col1 </td>
|
18
|
+
<td> Row 2 Col2 </td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td> Row 3 Col1 </td>
|
22
|
+
<td> Row 3 Col2 </td>
|
23
|
+
</tr>
|
24
|
+
</table>
|
25
|
+
</body>
|
26
|
+
</html>
|