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
@@ -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,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>
|
data/unittests/html/cssTest.html
CHANGED
@@ -1,42 +1,42 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<title>Test Hidden Message</title>
|
4
|
-
|
5
|
-
<style type="text/css">
|
6
|
-
div.hide { display: none; margin-left: auto; margin-right: auto; }
|
7
|
-
div.show { display: block; margin-left: auto; margin-right: auto; }
|
8
|
-
#Container { background: #f00; color: #fff; width: 300px; height: 300px; padding-top: 100px; text-align: center; font: bold 2em Verdana, Helvetica, sans-serif; }
|
9
|
-
|
10
|
-
</style>
|
11
|
-
|
12
|
-
<script type="text/javascript">
|
13
|
-
function show(divId)
|
14
|
-
{
|
15
|
-
var divContainer = document.getElementById("Container");
|
16
|
-
var divArr = divContainer.getElementsByTagName("div");
|
17
|
-
for (var i = 0; i < divArr.length; i++)
|
18
|
-
{
|
19
|
-
if ( divArr[i].id == divId )
|
20
|
-
{
|
21
|
-
divArr[i].className = "show";
|
22
|
-
}
|
23
|
-
else
|
24
|
-
{
|
25
|
-
divArr[i].className = "hide";
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
</script>
|
30
|
-
</head>
|
31
|
-
|
32
|
-
<body>
|
33
|
-
<div id="Container">
|
34
|
-
<div id="successError" class="hide">Success!</div><div id="failureError" class="hide">Failure!</div>
|
35
|
-
</div>
|
36
|
-
<form style="width: 300px; text-align: center;">
|
37
|
-
<p>Click on a button to display a message.</p>
|
38
|
-
<input type="button" name="success" value="Success" onclick="show( this.name + 'Error' );" />
|
39
|
-
<input type="button" name="failure" value="Failure" onclick="show( this.name + 'Error' );" />
|
40
|
-
</form>
|
41
|
-
</body>
|
42
|
-
</html>
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<title>Test Hidden Message</title>
|
4
|
+
|
5
|
+
<style type="text/css">
|
6
|
+
div.hide { display: none; margin-left: auto; margin-right: auto; }
|
7
|
+
div.show { display: block; margin-left: auto; margin-right: auto; }
|
8
|
+
#Container { background: #f00; color: #fff; width: 300px; height: 300px; padding-top: 100px; text-align: center; font: bold 2em Verdana, Helvetica, sans-serif; }
|
9
|
+
|
10
|
+
</style>
|
11
|
+
|
12
|
+
<script type="text/javascript">
|
13
|
+
function show(divId)
|
14
|
+
{
|
15
|
+
var divContainer = document.getElementById("Container");
|
16
|
+
var divArr = divContainer.getElementsByTagName("div");
|
17
|
+
for (var i = 0; i < divArr.length; i++)
|
18
|
+
{
|
19
|
+
if ( divArr[i].id == divId )
|
20
|
+
{
|
21
|
+
divArr[i].className = "show";
|
22
|
+
}
|
23
|
+
else
|
24
|
+
{
|
25
|
+
divArr[i].className = "hide";
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
</script>
|
30
|
+
</head>
|
31
|
+
|
32
|
+
<body>
|
33
|
+
<div id="Container">
|
34
|
+
<div id="successError" class="hide">Success!</div><div id="failureError" class="hide">Failure!</div>
|
35
|
+
</div>
|
36
|
+
<form style="width: 300px; text-align: center;">
|
37
|
+
<p>Click on a button to display a message.</p>
|
38
|
+
<input type="button" name="success" value="Success" onclick="show( this.name + 'Error' );" />
|
39
|
+
<input type="button" name="failure" value="Failure" onclick="show( this.name + 'Error' );" />
|
40
|
+
</form>
|
41
|
+
</body>
|
42
|
+
</html>
|
data/unittests/html/div.html
CHANGED
@@ -1,72 +1,72 @@
|
|
1
|
-
<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Test page for Div</title>
|
5
|
-
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
CVS Revision: "$Revision: 1.0 $"
|
9
|
-
<br>
|
10
|
-
<br>
|
11
|
-
<div id="div1" title="Test1" attribute="attribute" ondblclick="javascript: window.location.href='pass.html';">This text is in a div with an id of div1 and title of test1</div>
|
12
|
-
<br>
|
13
|
-
<div id="div2" class="blueText">This text is in a div with an id of div2</div>
|
14
|
-
<br>
|
15
|
-
<div id="div3" onClick="javascript:document.all.text1.value=parseInt(document.all.text1.value)+1">This div has an onClick that increments text1</div>
|
16
|
-
<div id="div4" onClick="javascript:document.all.text1.value=parseInt(document.all.text1.value)-1">This div has an onClick that decrements text1</div>
|
17
|
-
This input field gets its value from div3. Its name is text1<input type="text" name="text1" value="0">
|
18
|
-
<br>
|
19
|
-
<br>
|
20
|
-
The following DIVS are used to test buttons and other objects in a div
|
21
|
-
<div id="buttons1">
|
22
|
-
<input type="button" name="b1" value="Button 1" onClick="javascript:document.all.div_text1.value='button1';">
|
23
|
-
</div>
|
24
|
-
<div id="buttons2">
|
25
|
-
<input type="button" name="b2" value="Button 2" onClick="javascript:document.all.div_text1.value='button2';">
|
26
|
-
<input type="button" name="b3" value="Button 3" onClick="javascript:document.all.div_text1.value='button3';">
|
27
|
-
</div>
|
28
|
-
<div id="text_fields1" class="divClass" name="divName">
|
29
|
-
Text1: <input type="text" name="div_text1"> Text2: <input type="text" name="div_text2">
|
30
|
-
Text3: <input type="text" name="div_text3">
|
31
|
-
</div>
|
32
|
-
<br>
|
33
|
-
<hr>
|
34
|
-
Span Tests
|
35
|
-
<br>
|
36
|
-
<br>
|
37
|
-
<span id="span1" title="Test2" onClick="window.location.href='pass.html'">This text is in a span with an id of span1 and title of test2</span>
|
38
|
-
<br>
|
39
|
-
<span id="span2" class="blueText">This text is in a span with an id of span2</span>
|
40
|
-
<br>
|
41
|
-
<span id="span3" onClick="javascript:document.all.text2.value=parseInt(document.all.text2.value)+1">This span has an onClick that increments text2</span>
|
42
|
-
<br>
|
43
|
-
<span id="span4" onClick="javascript:document.all.text2.value=parseInt(document.all.text2.value)-1">This span has an onClick that decrements text2</span>
|
44
|
-
<br>
|
45
|
-
This input field gets its value from span3. Its name is text1<input type="text" name="text2" value="0">
|
46
|
-
<br>
|
47
|
-
<br>
|
48
|
-
The following spans are used to test buttons and other objects in a span
|
49
|
-
<br>
|
50
|
-
<span id="buttons1">
|
51
|
-
<input type="button" name="b1" value="Button 1" onClick="javascript:document.all.span_text1.value='button1';">
|
52
|
-
</span>
|
53
|
-
<br>
|
54
|
-
<span id="buttons2">
|
55
|
-
<input type="button" name="b2" value="Button 2" onClick="javascript:document.all.span_text1.value='button2';">
|
56
|
-
<input type="button" name="b3" value="Button 3" onClick="javascript:document.all.span_text1.value='button3';">
|
57
|
-
</span>
|
58
|
-
<br>
|
59
|
-
<span id="text_fields1" name="spanName" class="spanClass">
|
60
|
-
Text1: <input type="text" name="span_text1"> Text2: <input type="text" name="span_text2"> Text3: <input type="text" name="span_text3">
|
61
|
-
</span>
|
62
|
-
<br>
|
63
|
-
<br>
|
64
|
-
<p id="number1" title="P_tag_1" class="redText">This text is in a p with an id of
|
65
|
-
number1 and title of P_tag_1</p>
|
66
|
-
<br>
|
67
|
-
<p id="number2" title="P_tag_2" class="italicText">This text is in a p with an id of number2</p>
|
68
|
-
<br>
|
69
|
-
<p id="number3" title="test_3" class="blueText">This text is in a p with an id of
|
70
|
-
number3</p>
|
71
|
-
</body>
|
72
|
-
</html>
|
1
|
+
<DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Test page for Div</title>
|
5
|
+
<link rel="stylesheet" type="text/css" href="watir_unit_tests.css">
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
CVS Revision: "$Revision: 1.0 $"
|
9
|
+
<br>
|
10
|
+
<br>
|
11
|
+
<div id="div1" title="Test1" attribute="attribute" ondblclick="javascript: window.location.href='pass.html';">This text is in a div with an id of div1 and title of test1</div>
|
12
|
+
<br>
|
13
|
+
<div id="div2" class="blueText">This text is in a div with an id of div2</div>
|
14
|
+
<br>
|
15
|
+
<div id="div3" onClick="javascript:document.all.text1.value=parseInt(document.all.text1.value)+1">This div has an onClick that increments text1</div>
|
16
|
+
<div id="div4" onClick="javascript:document.all.text1.value=parseInt(document.all.text1.value)-1">This div has an onClick that decrements text1</div>
|
17
|
+
This input field gets its value from div3. Its name is text1<input type="text" name="text1" value="0">
|
18
|
+
<br>
|
19
|
+
<br>
|
20
|
+
The following DIVS are used to test buttons and other objects in a div
|
21
|
+
<div id="buttons1">
|
22
|
+
<input type="button" name="b1" value="Button 1" onClick="javascript:document.all.div_text1.value='button1';">
|
23
|
+
</div>
|
24
|
+
<div id="buttons2">
|
25
|
+
<input type="button" name="b2" value="Button 2" onClick="javascript:document.all.div_text1.value='button2';">
|
26
|
+
<input type="button" name="b3" value="Button 3" onClick="javascript:document.all.div_text1.value='button3';">
|
27
|
+
</div>
|
28
|
+
<div id="text_fields1" class="divClass" name="divName">
|
29
|
+
Text1: <input type="text" name="div_text1"> Text2: <input type="text" name="div_text2">
|
30
|
+
Text3: <input type="text" name="div_text3">
|
31
|
+
</div>
|
32
|
+
<br>
|
33
|
+
<hr>
|
34
|
+
Span Tests
|
35
|
+
<br>
|
36
|
+
<br>
|
37
|
+
<span id="span1" title="Test2" onClick="window.location.href='pass.html'">This text is in a span with an id of span1 and title of test2</span>
|
38
|
+
<br>
|
39
|
+
<span id="span2" class="blueText">This text is in a span with an id of span2</span>
|
40
|
+
<br>
|
41
|
+
<span id="span3" onClick="javascript:document.all.text2.value=parseInt(document.all.text2.value)+1">This span has an onClick that increments text2</span>
|
42
|
+
<br>
|
43
|
+
<span id="span4" onClick="javascript:document.all.text2.value=parseInt(document.all.text2.value)-1">This span has an onClick that decrements text2</span>
|
44
|
+
<br>
|
45
|
+
This input field gets its value from span3. Its name is text1<input type="text" name="text2" value="0">
|
46
|
+
<br>
|
47
|
+
<br>
|
48
|
+
The following spans are used to test buttons and other objects in a span
|
49
|
+
<br>
|
50
|
+
<span id="buttons1">
|
51
|
+
<input type="button" name="b1" value="Button 1" onClick="javascript:document.all.span_text1.value='button1';">
|
52
|
+
</span>
|
53
|
+
<br>
|
54
|
+
<span id="buttons2">
|
55
|
+
<input type="button" name="b2" value="Button 2" onClick="javascript:document.all.span_text1.value='button2';">
|
56
|
+
<input type="button" name="b3" value="Button 3" onClick="javascript:document.all.span_text1.value='button3';">
|
57
|
+
</span>
|
58
|
+
<br>
|
59
|
+
<span id="text_fields1" name="spanName" class="spanClass">
|
60
|
+
Text1: <input type="text" name="span_text1"> Text2: <input type="text" name="span_text2"> Text3: <input type="text" name="span_text3">
|
61
|
+
</span>
|
62
|
+
<br>
|
63
|
+
<br>
|
64
|
+
<p id="number1" title="P_tag_1" class="redText">This text is in a p with an id of
|
65
|
+
number1 and title of P_tag_1</p>
|
66
|
+
<br>
|
67
|
+
<p id="number2" title="P_tag_2" class="italicText">This text is in a p with an id of number2</p>
|
68
|
+
<br>
|
69
|
+
<p id="number3" title="test_3" class="blueText">This text is in a p with an id of
|
70
|
+
number3</p>
|
71
|
+
</body>
|
72
|
+
</html>
|