firewatir 1.6.5 → 1.6.6.rc1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +461 -0
- data/LICENSE +31 -31
- data/README.rdoc +112 -0
- data/VERSION +1 -0
- data/lib/firewatir.rb +41 -40
- data/lib/firewatir/container.rb +491 -491
- data/lib/firewatir/document.rb +239 -239
- data/lib/firewatir/element.rb +1364 -1364
- data/lib/firewatir/element_collections.rb +314 -314
- data/lib/firewatir/elements/button.rb +15 -15
- data/lib/firewatir/elements/file_field.rb +29 -29
- data/lib/firewatir/elements/form.rb +40 -40
- data/lib/firewatir/elements/frame.rb +55 -55
- data/lib/firewatir/elements/hidden.rb +56 -56
- data/lib/firewatir/elements/image.rb +139 -139
- data/lib/firewatir/elements/input_element.rb +44 -44
- data/lib/firewatir/elements/link.rb +76 -76
- data/lib/firewatir/elements/non_control_element.rb +53 -53
- data/lib/firewatir/elements/non_control_elements.rb +108 -108
- data/lib/firewatir/elements/not_used.rb +278 -278
- data/lib/firewatir/elements/option.rb +130 -130
- data/lib/firewatir/elements/radio_check_common.rb +163 -163
- data/lib/firewatir/elements/select_list.rb +188 -188
- data/lib/firewatir/elements/table.rb +218 -218
- data/lib/firewatir/elements/table_cell.rb +54 -54
- data/lib/firewatir/elements/table_row.rb +100 -100
- data/lib/firewatir/elements/text_field.rb +218 -218
- data/lib/firewatir/exceptions.rb +10 -10
- data/lib/firewatir/firefox.rb +984 -1040
- data/lib/firewatir/jssh_socket.rb +100 -100
- data/lib/firewatir/winClicker.rb +122 -122
- data/lib/firewatir/x11.rb +192 -192
- data/rakefile.rb +15 -0
- data/unittests/attach_to_new_window_test.rb +49 -49
- data/unittests/bug_fixes_test.rb +195 -195
- data/unittests/buttons_xpath_test.rb +88 -88
- data/unittests/checkbox_test.rb +158 -158
- data/unittests/checkbox_xpath_test.rb +107 -107
- data/unittests/div_test.rb +275 -275
- data/unittests/ff_test.rb +47 -0
- data/unittests/filefield_test.rb +49 -49
- data/unittests/filefield_xpath_test.rb +35 -35
- data/unittests/form_test.rb +296 -296
- data/unittests/frame_test.rb +159 -159
- data/unittests/hidden_test.rb +85 -85
- data/unittests/hidden_xpath_test.rb +72 -72
- data/unittests/html/JavascriptClick.html +42 -42
- data/unittests/html/blankpage.html +11 -11
- data/unittests/html/buttons1.html +61 -61
- data/unittests/html/checkboxes1.html +70 -70
- data/unittests/html/complex_table.html +36 -36
- data/unittests/html/cssTest.html +42 -42
- data/unittests/html/div.html +72 -72
- data/unittests/html/div_xml.html +20 -20
- data/unittests/html/fileupload.html +45 -45
- data/unittests/html/formTest1.html +38 -38
- data/unittests/html/forms2.html +45 -45
- data/unittests/html/forms3.html +132 -132
- data/unittests/html/forms4.html +27 -27
- data/unittests/html/frame_buttons.html +3 -3
- data/unittests/html/frame_links.html +3 -3
- data/unittests/html/frame_multi.html +4 -4
- data/unittests/html/iframeTest.html +14 -14
- data/unittests/html/iframeTest1.html +13 -13
- data/unittests/html/iframeTest2.html +5 -5
- data/unittests/html/images1.html +66 -66
- data/unittests/html/javascriptevents.html +35 -35
- data/unittests/html/link_pass.html +10 -10
- data/unittests/html/links1.html +42 -42
- data/unittests/html/links2.html +10 -10
- data/unittests/html/modal_dialog.html +8 -8
- data/unittests/html/modal_dialog_launcher.html +11 -11
- data/unittests/html/nestedFrames.html +6 -6
- data/unittests/html/new_browser.html +17 -17
- data/unittests/html/new_browser_popup.html +7 -7
- data/unittests/html/pass.html +9 -9
- data/unittests/html/popups1.html +60 -60
- data/unittests/html/pre.html +27 -27
- data/unittests/html/radioButtons1.html +70 -70
- 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/select_tealeaf.html +54 -54
- data/unittests/html/selectboxes1.html +55 -55
- data/unittests/html/simple_table.html +26 -26
- data/unittests/html/simple_table_buttons.html +104 -104
- data/unittests/html/simple_table_columns.html +74 -74
- data/unittests/html/table1.html +165 -165
- data/unittests/html/tableCell_using_xpath.html +19 -19
- data/unittests/html/textarea.html +30 -30
- data/unittests/html/textfields1.html +62 -62
- data/unittests/html/textsearch.html +44 -44
- data/unittests/images_test.rb +198 -198
- data/unittests/images_xpath_test.rb +118 -118
- data/unittests/javascript_test.rb +75 -75
- data/unittests/links_test.rb +231 -231
- data/unittests/links_xpath_test.rb +79 -79
- data/unittests/mozilla_all_tests.rb +7 -7
- data/unittests/pre_test.rb +75 -75
- data/unittests/radios_test.rb +166 -166
- 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 -29
- data/unittests/table_test.rb +385 -385
- data/unittests/table_xpath_test.rb +185 -185
- data/unittests/textfields_test.rb +234 -234
- data/unittests/textfields_xpath_test.rb +113 -113
- metadata +51 -19
- data/lib/firewatir/version.rb +0 -5
@@ -1,72 +1,72 @@
|
|
1
|
-
# feature tests for Input Hidden elements
|
2
|
-
# revision: $Revision: 1.0 $
|
3
|
-
|
4
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
|
5
|
-
require 'unittests/setup'
|
6
|
-
|
7
|
-
class TC_Hidden_Fields_XPath < Test::Unit::TestCase
|
8
|
-
def setup
|
9
|
-
goto_page("forms3.html")
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_hidden
|
13
|
-
|
14
|
-
# test using name and ID
|
15
|
-
assert( browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").exists? )
|
16
|
-
assert( browser.hidden(:xpath,"//input[@type='hidden' and @id='hidden_1']").exists? )
|
17
|
-
assert_false( browser.hidden(:xpath,"//input[@type='hidden' and @name='hidden_44']").exists? )
|
18
|
-
assert_false( browser.hidden(:xpath,"//input[@type='hidden' and @id='hidden_55']").exists? )
|
19
|
-
|
20
|
-
browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").value = 444
|
21
|
-
browser.hidden(:xpath,"//input[@type='hidden' and @id='hidden_1']").value = 555
|
22
|
-
|
23
|
-
browser.button(:xpath , "//input[@type='button' and @value='Show Hidden']").click
|
24
|
-
|
25
|
-
assert_equal("444" , browser.text_field(:xpath , "//input[@name='vis1']").value )
|
26
|
-
assert_equal("555" , browser.text_field(:xpath ,"//input[@name='vis2']").value )
|
27
|
-
|
28
|
-
# test the over-ridden append method
|
29
|
-
browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").append("a")
|
30
|
-
browser.button(:xpath , "//input[@type='button' and @value='Show Hidden']").click
|
31
|
-
assert_equal("444a" , browser.text_field(:xpath , "//input[@name='vis1']").value )
|
32
|
-
assert_equal("555" , browser.text_field(:xpath ,"//input[@name='vis2']").value )
|
33
|
-
|
34
|
-
# test the over-ridden clear method
|
35
|
-
browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").clear
|
36
|
-
browser.button(:xpath , "//input[@type='button' and @value='Show Hidden']").click
|
37
|
-
assert_equal("" , browser.text_field(:xpath , "//input[@name='vis1']").value )
|
38
|
-
assert_equal("555" , browser.text_field(:xpath ,"//input[@name='vis2']").value )
|
39
|
-
|
40
|
-
# test using a form
|
41
|
-
#assert( browser.form(:name , "has_a_hidden").hidden(:name ,"hid1").exists? )
|
42
|
-
#assert( browser.form(:name , "has_a_hidden").hidden(:id,"hidden_1").exists? )
|
43
|
-
#assert_false( browser.form(:name , "has_a_hidden").hidden(:name,"hidden_44").exists? )
|
44
|
-
#assert_false( browser.form(:name , "has_a_hidden").hidden(:id,"hidden_55").exists? )
|
45
|
-
|
46
|
-
#browser.form(:name , "has_a_hidden").hidden(:name ,"hid1").value = 222
|
47
|
-
#browser.form(:name , "has_a_hidden").hidden(:id,"hidden_1").value = 333
|
48
|
-
|
49
|
-
#browser.button(:value , "Show Hidden").click
|
50
|
-
|
51
|
-
#assert_equal("222" , browser.text_field(:name , "vis1").value )
|
52
|
-
#assert_equal("333" , browser.text_field(:name ,"vis2").value )
|
53
|
-
|
54
|
-
# iterators
|
55
|
-
#assert_equal(2, browser.hiddens.length)
|
56
|
-
#count =1
|
57
|
-
#browser.hiddens.each do |h|
|
58
|
-
# case count
|
59
|
-
# when 1
|
60
|
-
# assert_equal( "", h.id)
|
61
|
-
# assert_equal( "hid1", h.name)
|
62
|
-
# when 2
|
63
|
-
# assert_equal( "", h.name)
|
64
|
-
# assert_equal( "hidden_1", h.id)
|
65
|
-
# end
|
66
|
-
# count+=1
|
67
|
-
#end
|
68
|
-
|
69
|
-
#assert_equal("hid1" , browser.hiddens[1].name )
|
70
|
-
#assert_equal("hidden_1" , browser.hiddens[2].id )
|
71
|
-
end
|
72
|
-
end
|
1
|
+
# feature tests for Input Hidden elements
|
2
|
+
# revision: $Revision: 1.0 $
|
3
|
+
|
4
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..') unless $SETUP_LOADED
|
5
|
+
require 'unittests/setup'
|
6
|
+
|
7
|
+
class TC_Hidden_Fields_XPath < Test::Unit::TestCase
|
8
|
+
def setup
|
9
|
+
goto_page("forms3.html")
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_hidden
|
13
|
+
|
14
|
+
# test using name and ID
|
15
|
+
assert( browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").exists? )
|
16
|
+
assert( browser.hidden(:xpath,"//input[@type='hidden' and @id='hidden_1']").exists? )
|
17
|
+
assert_false( browser.hidden(:xpath,"//input[@type='hidden' and @name='hidden_44']").exists? )
|
18
|
+
assert_false( browser.hidden(:xpath,"//input[@type='hidden' and @id='hidden_55']").exists? )
|
19
|
+
|
20
|
+
browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").value = 444
|
21
|
+
browser.hidden(:xpath,"//input[@type='hidden' and @id='hidden_1']").value = 555
|
22
|
+
|
23
|
+
browser.button(:xpath , "//input[@type='button' and @value='Show Hidden']").click
|
24
|
+
|
25
|
+
assert_equal("444" , browser.text_field(:xpath , "//input[@name='vis1']").value )
|
26
|
+
assert_equal("555" , browser.text_field(:xpath ,"//input[@name='vis2']").value )
|
27
|
+
|
28
|
+
# test the over-ridden append method
|
29
|
+
browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").append("a")
|
30
|
+
browser.button(:xpath , "//input[@type='button' and @value='Show Hidden']").click
|
31
|
+
assert_equal("444a" , browser.text_field(:xpath , "//input[@name='vis1']").value )
|
32
|
+
assert_equal("555" , browser.text_field(:xpath ,"//input[@name='vis2']").value )
|
33
|
+
|
34
|
+
# test the over-ridden clear method
|
35
|
+
browser.hidden(:xpath,"//input[@type='hidden' and @name='hid1']").clear
|
36
|
+
browser.button(:xpath , "//input[@type='button' and @value='Show Hidden']").click
|
37
|
+
assert_equal("" , browser.text_field(:xpath , "//input[@name='vis1']").value )
|
38
|
+
assert_equal("555" , browser.text_field(:xpath ,"//input[@name='vis2']").value )
|
39
|
+
|
40
|
+
# test using a form
|
41
|
+
#assert( browser.form(:name , "has_a_hidden").hidden(:name ,"hid1").exists? )
|
42
|
+
#assert( browser.form(:name , "has_a_hidden").hidden(:id,"hidden_1").exists? )
|
43
|
+
#assert_false( browser.form(:name , "has_a_hidden").hidden(:name,"hidden_44").exists? )
|
44
|
+
#assert_false( browser.form(:name , "has_a_hidden").hidden(:id,"hidden_55").exists? )
|
45
|
+
|
46
|
+
#browser.form(:name , "has_a_hidden").hidden(:name ,"hid1").value = 222
|
47
|
+
#browser.form(:name , "has_a_hidden").hidden(:id,"hidden_1").value = 333
|
48
|
+
|
49
|
+
#browser.button(:value , "Show Hidden").click
|
50
|
+
|
51
|
+
#assert_equal("222" , browser.text_field(:name , "vis1").value )
|
52
|
+
#assert_equal("333" , browser.text_field(:name ,"vis2").value )
|
53
|
+
|
54
|
+
# iterators
|
55
|
+
#assert_equal(2, browser.hiddens.length)
|
56
|
+
#count =1
|
57
|
+
#browser.hiddens.each do |h|
|
58
|
+
# case count
|
59
|
+
# when 1
|
60
|
+
# assert_equal( "", h.id)
|
61
|
+
# assert_equal( "hid1", h.name)
|
62
|
+
# when 2
|
63
|
+
# assert_equal( "", h.name)
|
64
|
+
# assert_equal( "hidden_1", h.id)
|
65
|
+
# end
|
66
|
+
# count+=1
|
67
|
+
#end
|
68
|
+
|
69
|
+
#assert_equal("hid1" , browser.hiddens[1].name )
|
70
|
+
#assert_equal("hidden_1" , browser.hiddens[2].id )
|
71
|
+
end
|
72
|
+
end
|
@@ -1,42 +1,42 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Alert Test</title>
|
4
|
-
<script type="text/javascript">
|
5
|
-
function disp_confirm()
|
6
|
-
{
|
7
|
-
testResult = document.getElementById('testResult');
|
8
|
-
var name=confirm("Press a button")
|
9
|
-
if (name==true) {
|
10
|
-
testResult.value = "You pressed the Confirm and OK button!"
|
11
|
-
}
|
12
|
-
else{
|
13
|
-
testResult.value = "You pressed the Confirm and Cancel button!"
|
14
|
-
}
|
15
|
-
}
|
16
|
-
function disp_alert()
|
17
|
-
{
|
18
|
-
testResult = document.getElementById('testResult');
|
19
|
-
alert("Press OK")
|
20
|
-
testResult.value = "You pressed the Alert button!"
|
21
|
-
}
|
22
|
-
</script>
|
23
|
-
|
24
|
-
</head>
|
25
|
-
<body>
|
26
|
-
<form action="get">
|
27
|
-
<p>There are two basic methods for bringing up dialogs using javascript.</p>
|
28
|
-
<ul>
|
29
|
-
<li>
|
30
|
-
alert(message) -- Display message and OK button.<br/>
|
31
|
-
<input type="button" id="btnAlert" value="alert" OnClick="disp_alert();" />
|
32
|
-
</li>
|
33
|
-
<li>
|
34
|
-
confirm(message) -- Display message and OK and Cancel buttons.<br/>
|
35
|
-
<input type="button" id="btnConfirm" value="confirm" OnClick="disp_confirm();" /> </li>
|
36
|
-
</ul>
|
37
|
-
<p>Results of dialogs:</p>
|
38
|
-
<input type="text" style="width:248px;" id="testResult" value="Test Result" />
|
39
|
-
</form>
|
40
|
-
</body>
|
41
|
-
|
42
|
-
</html>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Alert Test</title>
|
4
|
+
<script type="text/javascript">
|
5
|
+
function disp_confirm()
|
6
|
+
{
|
7
|
+
testResult = document.getElementById('testResult');
|
8
|
+
var name=confirm("Press a button")
|
9
|
+
if (name==true) {
|
10
|
+
testResult.value = "You pressed the Confirm and OK button!"
|
11
|
+
}
|
12
|
+
else{
|
13
|
+
testResult.value = "You pressed the Confirm and Cancel button!"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
function disp_alert()
|
17
|
+
{
|
18
|
+
testResult = document.getElementById('testResult');
|
19
|
+
alert("Press OK")
|
20
|
+
testResult.value = "You pressed the Alert button!"
|
21
|
+
}
|
22
|
+
</script>
|
23
|
+
|
24
|
+
</head>
|
25
|
+
<body>
|
26
|
+
<form action="get">
|
27
|
+
<p>There are two basic methods for bringing up dialogs using javascript.</p>
|
28
|
+
<ul>
|
29
|
+
<li>
|
30
|
+
alert(message) -- Display message and OK button.<br/>
|
31
|
+
<input type="button" id="btnAlert" value="alert" OnClick="disp_alert();" />
|
32
|
+
</li>
|
33
|
+
<li>
|
34
|
+
confirm(message) -- Display message and OK and Cancel buttons.<br/>
|
35
|
+
<input type="button" id="btnConfirm" value="confirm" OnClick="disp_confirm();" /> </li>
|
36
|
+
</ul>
|
37
|
+
<p>Results of dialogs:</p>
|
38
|
+
<input type="text" style="width:248px;" id="testResult" value="Test Result" />
|
39
|
+
</form>
|
40
|
+
</body>
|
41
|
+
|
42
|
+
</html>
|
@@ -1,12 +1,12 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>
|
4
|
-
Test page for buttons
|
5
|
-
</title>
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
CVS Revision: $Revision 1.0$
|
9
|
-
<br>
|
10
|
-
Blank page to fill in the frames
|
11
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for buttons
|
5
|
+
</title>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
CVS Revision: $Revision 1.0$
|
9
|
+
<br>
|
10
|
+
Blank page to fill in the frames
|
11
|
+
</body>
|
12
12
|
</html>
|
@@ -1,61 +1,61 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>
|
4
|
-
Test page for buttons
|
5
|
-
</title>
|
6
|
-
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
CVS Revision: $Revision: 1.0 $
|
10
|
-
<br>
|
11
|
-
<br>
|
12
|
-
<table>
|
13
|
-
<tr>
|
14
|
-
<td>
|
15
|
-
<form name = test1 method = get action = pass.html>
|
16
|
-
|
17
|
-
<input type = button class="italic_button" name = b1 id = b2 value = "Click Me" onClick="javascript:document.location='pass.html';" title = "this is button1">
|
18
|
-
<br><input type = button name = b4 id=b5 value = "Disabled Button" onClick="javascript:document.location='fail.html';" disabled>
|
19
|
-
<input type=text id="text_id" value="OldValue" size="20"/>
|
20
|
-
</form>
|
21
|
-
</td>
|
22
|
-
<td> The top button is for testing buttons with names
|
23
|
-
<br> The second button is used for testing disabled buttons
|
24
|
-
</td>
|
25
|
-
</tr>
|
26
|
-
|
27
|
-
<tr>
|
28
|
-
<td>
|
29
|
-
<form name = test2 method = get action = pass2.html>
|
30
|
-
<br><input type = submit value=Submit>
|
31
|
-
</form>
|
32
|
-
</td>
|
33
|
-
<td> This button is a submit ( the others are buttons)
|
34
|
-
</td>
|
35
|
-
</tr>
|
36
|
-
<tr>
|
37
|
-
<td>
|
38
|
-
<form name = test3 method = get action = pass3.html>
|
39
|
-
<br><input type = image src=images/button.jpg name =sub3>
|
40
|
-
</form>
|
41
|
-
</td>
|
42
|
-
<td> This button is an image. It should behave the same as a submit
|
43
|
-
|
44
|
-
</td>
|
45
|
-
</tr>
|
46
|
-
<tr>
|
47
|
-
<td>
|
48
|
-
<form name = test1 method = get action = pass.html>
|
49
|
-
|
50
|
-
<button class="italic_button" name=b6 id = b7 value="Click Me2" onClick="javascript:document.location='pass.html';" title="this is button2">Click Me2</button>
|
51
|
-
<br><button name = b8 id=b9 value ="Disabled Button2" onClick="javascript:document.location='fail.html';" disabled>Disabled Button2</button>
|
52
|
-
<button>Sign In</button>
|
53
|
-
</td>
|
54
|
-
</form>
|
55
|
-
<td> The top button is for testing buttons with names
|
56
|
-
<br> The second button is used for testing disabled buttons
|
57
|
-
</td>
|
58
|
-
</tr>
|
59
|
-
</table>
|
60
|
-
</body>
|
61
|
-
</html>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for buttons
|
5
|
+
</title>
|
6
|
+
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
CVS Revision: $Revision: 1.0 $
|
10
|
+
<br>
|
11
|
+
<br>
|
12
|
+
<table>
|
13
|
+
<tr>
|
14
|
+
<td>
|
15
|
+
<form name = test1 method = get action = pass.html>
|
16
|
+
|
17
|
+
<input type = button class="italic_button" name = b1 id = b2 value = "Click Me" onClick="javascript:document.location='pass.html';" title = "this is button1">
|
18
|
+
<br><input type = button name = b4 id=b5 value = "Disabled Button" onClick="javascript:document.location='fail.html';" disabled>
|
19
|
+
<input type=text id="text_id" value="OldValue" size="20"/>
|
20
|
+
</form>
|
21
|
+
</td>
|
22
|
+
<td> The top button is for testing buttons with names
|
23
|
+
<br> The second button is used for testing disabled buttons
|
24
|
+
</td>
|
25
|
+
</tr>
|
26
|
+
|
27
|
+
<tr>
|
28
|
+
<td>
|
29
|
+
<form name = test2 method = get action = pass2.html>
|
30
|
+
<br><input type = submit value=Submit>
|
31
|
+
</form>
|
32
|
+
</td>
|
33
|
+
<td> This button is a submit ( the others are buttons)
|
34
|
+
</td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td>
|
38
|
+
<form name = test3 method = get action = pass3.html>
|
39
|
+
<br><input type = image src=images/button.jpg name =sub3>
|
40
|
+
</form>
|
41
|
+
</td>
|
42
|
+
<td> This button is an image. It should behave the same as a submit
|
43
|
+
|
44
|
+
</td>
|
45
|
+
</tr>
|
46
|
+
<tr>
|
47
|
+
<td>
|
48
|
+
<form name = test1 method = get action = pass.html>
|
49
|
+
|
50
|
+
<button class="italic_button" name=b6 id = b7 value="Click Me2" onClick="javascript:document.location='pass.html';" title="this is button2">Click Me2</button>
|
51
|
+
<br><button name = b8 id=b9 value ="Disabled Button2" onClick="javascript:document.location='fail.html';" disabled>Disabled Button2</button>
|
52
|
+
<button>Sign In</button>
|
53
|
+
</td>
|
54
|
+
</form>
|
55
|
+
<td> The top button is for testing buttons with names
|
56
|
+
<br> The second button is used for testing disabled buttons
|
57
|
+
</td>
|
58
|
+
</tr>
|
59
|
+
</table>
|
60
|
+
</body>
|
61
|
+
</html>
|
@@ -1,71 +1,71 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>
|
4
|
-
Test page for Check Boxes
|
5
|
-
</title>
|
6
|
-
|
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
|
-
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
19
|
-
|
20
|
-
</head>
|
21
|
-
<body>
|
22
|
-
CVS Revision: $Revision 1.0$
|
23
|
-
<br>
|
24
|
-
<br>
|
25
|
-
<table>
|
26
|
-
<tr>
|
27
|
-
<td>
|
28
|
-
CheckBox 1 <input type = checkbox name = box1 class=check_box_style >
|
29
|
-
|
30
|
-
<tr>
|
31
|
-
<td>
|
32
|
-
Disabled<input type = checkbox name = box2 disabled>
|
33
|
-
|
34
|
-
<tr>
|
35
|
-
<td>
|
36
|
-
Set<input type = checkbox name = box3 checked>
|
37
|
-
|
38
|
-
<tr>
|
39
|
-
<td>
|
40
|
-
These 2 have ids
|
41
|
-
<br>
|
42
|
-
id= box4 value=1 <input type = checkbox id = box4 name= verify1 value = 1 checked>
|
43
|
-
<br>
|
44
|
-
id = box4 value=2 <input type = checkbox id = box4 name= verify2 value = 2 checked>
|
45
|
-
|
46
|
-
<br>
|
47
|
-
<br>
|
48
|
-
These boxes have the same name, but different values
|
49
|
-
<br>
|
50
|
-
Name = box4 value=1 <input type = checkbox name = box4 value = 1 checked>
|
51
|
-
<br>
|
52
|
-
Name = box4 value=2 <input type = checkbox name = box4 value = 2>
|
53
|
-
<br>
|
54
|
-
Name = box4 value=3 <input type = checkbox name = box4 value = 3>
|
55
|
-
<br>
|
56
|
-
Name = box4 value=4 <input type = checkbox name = box4 value = 4>
|
57
|
-
<br>
|
58
|
-
Name = box4 value=5 <input type = checkbox name = box4 value = 5 disabled title="box4-value5">
|
59
|
-
|
60
|
-
<tr>
|
61
|
-
<td>
|
62
|
-
Name = box5 value=1 <input type = checkbox name = box5 value = 1 onClick='javascript:setButtonState( )'>
|
63
|
-
|
64
|
-
|
65
|
-
<tr>
|
66
|
-
<td>
|
67
|
-
<input type = button name = foo value = foo disabled ><td> This button is used with checkbox box5. This button is enabled if the checkbox is enabled
|
68
|
-
|
69
|
-
</table>
|
70
|
-
</body>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>
|
4
|
+
Test page for Check Boxes
|
5
|
+
</title>
|
6
|
+
|
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
|
+
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
19
|
+
|
20
|
+
</head>
|
21
|
+
<body>
|
22
|
+
CVS Revision: $Revision 1.0$
|
23
|
+
<br>
|
24
|
+
<br>
|
25
|
+
<table>
|
26
|
+
<tr>
|
27
|
+
<td>
|
28
|
+
CheckBox 1 <input type = checkbox name = box1 class=check_box_style >
|
29
|
+
|
30
|
+
<tr>
|
31
|
+
<td>
|
32
|
+
Disabled<input type = checkbox name = box2 disabled>
|
33
|
+
|
34
|
+
<tr>
|
35
|
+
<td>
|
36
|
+
Set<input type = checkbox name = box3 checked>
|
37
|
+
|
38
|
+
<tr>
|
39
|
+
<td>
|
40
|
+
These 2 have ids
|
41
|
+
<br>
|
42
|
+
id= box4 value=1 <input type = checkbox id = box4 name= verify1 value = 1 checked>
|
43
|
+
<br>
|
44
|
+
id = box4 value=2 <input type = checkbox id = box4 name= verify2 value = 2 checked>
|
45
|
+
|
46
|
+
<br>
|
47
|
+
<br>
|
48
|
+
These boxes have the same name, but different values
|
49
|
+
<br>
|
50
|
+
Name = box4 value=1 <input type = checkbox name = box4 value = 1 checked>
|
51
|
+
<br>
|
52
|
+
Name = box4 value=2 <input type = checkbox name = box4 value = 2>
|
53
|
+
<br>
|
54
|
+
Name = box4 value=3 <input type = checkbox name = box4 value = 3>
|
55
|
+
<br>
|
56
|
+
Name = box4 value=4 <input type = checkbox name = box4 value = 4>
|
57
|
+
<br>
|
58
|
+
Name = box4 value=5 <input type = checkbox name = box4 value = 5 disabled title="box4-value5">
|
59
|
+
|
60
|
+
<tr>
|
61
|
+
<td>
|
62
|
+
Name = box5 value=1 <input type = checkbox name = box5 value = 1 onClick='javascript:setButtonState( )'>
|
63
|
+
|
64
|
+
|
65
|
+
<tr>
|
66
|
+
<td>
|
67
|
+
<input type = button name = foo value = foo disabled ><td> This button is used with checkbox box5. This button is enabled if the checkbox is enabled
|
68
|
+
|
69
|
+
</table>
|
70
|
+
</body>
|
71
71
|
</html>
|