operawatir 0.3-jruby
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/.gitmodules +3 -0
- data/.yardopts +5 -0
- data/AUTHORS +7 -0
- data/Gemfile +9 -0
- data/LICENSE +30 -0
- data/README.md +158 -0
- data/Rakefile +59 -0
- data/VERSION +1 -0
- data/bin/desktopwatir +106 -0
- data/bin/operawatir +95 -0
- data/lib/operadriver/APACHE_2.0_LICENSE.txt +204 -0
- data/lib/operadriver/NEW_BSD_LICENSE.txt +36 -0
- data/lib/operadriver/commons-jxpath-1.3.jar +0 -0
- data/lib/operadriver/protobuf-java-2.3.0.jar +0 -0
- data/lib/operadriver/selenium-common.jar +0 -0
- data/lib/operadriver/webdriver-opera.jar +0 -0
- data/lib/operawatir.rb +46 -0
- data/lib/operawatir/browser.rb +181 -0
- data/lib/operawatir/collection.rb +133 -0
- data/lib/operawatir/compat.rb +25 -0
- data/lib/operawatir/compat/browser.rb +20 -0
- data/lib/operawatir/compat/collection.rb +99 -0
- data/lib/operawatir/compat/deprecation.rb +46 -0
- data/lib/operawatir/compat/element.rb +165 -0
- data/lib/operawatir/compat/element_finders.rb +159 -0
- data/lib/operawatir/compat/window.rb +27 -0
- data/lib/operawatir/element.rb +228 -0
- data/lib/operawatir/exceptions.rb +38 -0
- data/lib/operawatir/helper.rb +53 -0
- data/lib/operawatir/selector.rb +111 -0
- data/lib/operawatir/version.rb +15 -0
- data/lib/operawatir/window.rb +174 -0
- data/spec/fire_event/fire_event.rb +268 -0
- data/spec/fire_event/interactive/onBlur.html +45 -0
- data/spec/fire_event/interactive/onChange.html +47 -0
- data/spec/fire_event/interactive/onClick.html +45 -0
- data/spec/fire_event/interactive/onDblClick.html +45 -0
- data/spec/fire_event/interactive/onFocus.html +45 -0
- data/spec/fire_event/interactive/onMouseDown.html +45 -0
- data/spec/fire_event/interactive/onMouseMove.html +45 -0
- data/spec/fire_event/interactive/onMouseOut.html +45 -0
- data/spec/fire_event/interactive/onMouseOver.html +45 -0
- data/spec/fire_event/interactive/onMouseUp.html +45 -0
- data/spec/fire_event/interactive/onScroll.html +14 -0
- data/spec/legacy_watirspec/area_spec.rb +106 -0
- data/spec/legacy_watirspec/areas_spec.rb +38 -0
- data/spec/legacy_watirspec/browser_spec.rb +297 -0
- data/spec/legacy_watirspec/button_spec.rb +260 -0
- data/spec/legacy_watirspec/buttons_spec.rb +54 -0
- data/spec/legacy_watirspec/checkbox_spec.rb +280 -0
- data/spec/legacy_watirspec/checkboxes_spec.rb +38 -0
- data/spec/legacy_watirspec/collections_spec.rb +18 -0
- data/spec/legacy_watirspec/dd_spec.rb +140 -0
- data/spec/legacy_watirspec/dds_spec.rb +38 -0
- data/spec/legacy_watirspec/del_spec.rb +181 -0
- data/spec/legacy_watirspec/dels_spec.rb +62 -0
- data/spec/legacy_watirspec/div_spec.rb +244 -0
- data/spec/legacy_watirspec/divs_spec.rb +38 -0
- data/spec/legacy_watirspec/dl_spec.rb +140 -0
- data/spec/legacy_watirspec/dls_spec.rb +38 -0
- data/spec/legacy_watirspec/dt_spec.rb +140 -0
- data/spec/legacy_watirspec/dts_spec.rb +38 -0
- data/spec/legacy_watirspec/element_spec.rb +86 -0
- data/spec/legacy_watirspec/em_spec.rb +114 -0
- data/spec/legacy_watirspec/ems_spec.rb +38 -0
- data/spec/legacy_watirspec/filefield_spec.rb +127 -0
- data/spec/legacy_watirspec/filefields_spec.rb +38 -0
- data/spec/legacy_watirspec/fixtures/2000_spans.html +2009 -0
- data/spec/legacy_watirspec/fixtures/bug_duplicate_attributes.html +14 -0
- data/spec/legacy_watirspec/fixtures/bug_javascript_001.html +11 -0
- data/spec/legacy_watirspec/fixtures/buttons_with_duplicate_ids.html +18 -0
- data/spec/legacy_watirspec/fixtures/collections.html +15 -0
- data/spec/legacy_watirspec/fixtures/definition_lists.html +48 -0
- data/spec/legacy_watirspec/fixtures/euc-jp_text.html +17 -0
- data/spec/legacy_watirspec/fixtures/forms_with_input_elements.html +126 -0
- data/spec/legacy_watirspec/fixtures/frame_1.html +18 -0
- data/spec/legacy_watirspec/fixtures/frame_2.html +16 -0
- data/spec/legacy_watirspec/fixtures/frames.html +11 -0
- data/spec/legacy_watirspec/fixtures/iframes.html +12 -0
- data/spec/legacy_watirspec/fixtures/images.html +27 -0
- data/spec/legacy_watirspec/fixtures/images/1.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/2.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/3.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/button.jpg +0 -0
- data/spec/legacy_watirspec/fixtures/images/circle.jpg +0 -0
- data/spec/legacy_watirspec/fixtures/images/map.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/map2.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/minus.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/originaltriangle.jpg +0 -0
- data/spec/legacy_watirspec/fixtures/images/plus.gif +0 -0
- data/spec/legacy_watirspec/fixtures/images/square.jpg +0 -0
- data/spec/legacy_watirspec/fixtures/images/triangle.jpg +0 -0
- data/spec/legacy_watirspec/fixtures/iso-2022-jp_text.html +17 -0
- data/spec/legacy_watirspec/fixtures/javascript/helpers.js +16 -0
- data/spec/legacy_watirspec/fixtures/jquery.html +28 -0
- data/spec/legacy_watirspec/fixtures/latin1_text.html +17 -0
- data/spec/legacy_watirspec/fixtures/multiple_ids.html +14 -0
- data/spec/legacy_watirspec/fixtures/non_control_elements.html +135 -0
- data/spec/legacy_watirspec/fixtures/parser_bug_001.html +12 -0
- data/spec/legacy_watirspec/fixtures/prevent_form_submit.html +20 -0
- data/spec/legacy_watirspec/fixtures/right_click.html +11 -0
- data/spec/legacy_watirspec/fixtures/shift_jis_text.html +17 -0
- data/spec/legacy_watirspec/fixtures/tables.html +121 -0
- data/spec/legacy_watirspec/fixtures/timeout.html +16 -0
- data/spec/legacy_watirspec/fixtures/timeout_window_location.html +19 -0
- data/spec/legacy_watirspec/fixtures/tiny_mce.html +27 -0
- data/spec/legacy_watirspec/fixtures/utf8_text.html +15 -0
- data/spec/legacy_watirspec/fixtures/watirspec.css +0 -0
- data/spec/legacy_watirspec/form_spec.rb +73 -0
- data/spec/legacy_watirspec/forms_spec.rb +39 -0
- data/spec/legacy_watirspec/frame_spec.rb +161 -0
- data/spec/legacy_watirspec/frames_spec.rb +75 -0
- data/spec/legacy_watirspec/guards.rb +38 -0
- data/spec/legacy_watirspec/hidden_spec.rb +120 -0
- data/spec/legacy_watirspec/hiddens_spec.rb +38 -0
- data/spec/legacy_watirspec/hn_spec.rb +101 -0
- data/spec/legacy_watirspec/hns_spec.rb +39 -0
- data/spec/legacy_watirspec/image_spec.rb +237 -0
- data/spec/legacy_watirspec/images_spec.rb +38 -0
- data/spec/legacy_watirspec/ins_spec.rb +181 -0
- data/spec/legacy_watirspec/inses_spec.rb +62 -0
- data/spec/legacy_watirspec/label_spec.rb +85 -0
- data/spec/legacy_watirspec/labels_spec.rb +38 -0
- data/spec/legacy_watirspec/li_spec.rb +135 -0
- data/spec/legacy_watirspec/link_spec.rb +194 -0
- data/spec/legacy_watirspec/links_spec.rb +39 -0
- data/spec/legacy_watirspec/lis_spec.rb +38 -0
- data/spec/legacy_watirspec/map_spec.rb +100 -0
- data/spec/legacy_watirspec/maps_spec.rb +38 -0
- data/spec/legacy_watirspec/meta_spec.rb +26 -0
- data/spec/legacy_watirspec/metas_spec.rb +36 -0
- data/spec/legacy_watirspec/ol_spec.rb +86 -0
- data/spec/legacy_watirspec/ols_spec.rb +38 -0
- data/spec/legacy_watirspec/option_spec.rb +187 -0
- data/spec/legacy_watirspec/p_spec.rb +167 -0
- data/spec/legacy_watirspec/pre_spec.rb +133 -0
- data/spec/legacy_watirspec/pres_spec.rb +38 -0
- data/spec/legacy_watirspec/ps_spec.rb +38 -0
- data/spec/legacy_watirspec/radio_spec.rb +286 -0
- data/spec/legacy_watirspec/radios_spec.rb +35 -0
- data/spec/legacy_watirspec/select_list_spec.rb +326 -0
- data/spec/legacy_watirspec/select_lists_spec.rb +39 -0
- data/spec/legacy_watirspec/server.rb +91 -0
- data/spec/legacy_watirspec/span_spec.rb +181 -0
- data/spec/legacy_watirspec/spans_spec.rb +64 -0
- data/spec/legacy_watirspec/spec_helper.rb +12 -0
- data/spec/legacy_watirspec/strong_spec.rb +97 -0
- data/spec/legacy_watirspec/strongs_spec.rb +39 -0
- data/spec/legacy_watirspec/table_bodies_spec.rb +61 -0
- data/spec/legacy_watirspec/table_body_spec.rb +119 -0
- data/spec/legacy_watirspec/table_cell_spec.rb +76 -0
- data/spec/legacy_watirspec/table_cells_spec.rb +71 -0
- data/spec/legacy_watirspec/table_footer_spec.rb +94 -0
- data/spec/legacy_watirspec/table_footers_spec.rb +61 -0
- data/spec/legacy_watirspec/table_header_spec.rb +98 -0
- data/spec/legacy_watirspec/table_headers_spec.rb +59 -0
- data/spec/legacy_watirspec/table_row_spec.rb +104 -0
- data/spec/legacy_watirspec/table_rows_spec.rb +64 -0
- data/spec/legacy_watirspec/table_spec.rb +170 -0
- data/spec/legacy_watirspec/tables_spec.rb +40 -0
- data/spec/legacy_watirspec/text_field_spec.rb +315 -0
- data/spec/legacy_watirspec/text_fields_spec.rb +38 -0
- data/spec/legacy_watirspec/ul_spec.rb +84 -0
- data/spec/legacy_watirspec/uls_spec.rb +40 -0
- data/spec/legacy_watirspec/watir_compatibility_spec.rb +176 -0
- data/spec/legacy_watirspec/watirspec_helper.rb +57 -0
- data/utils/Rakefile +79 -0
- data/utils/launchers/launcher-linux-i686 +0 -0
- data/utils/launchers/launcher-linux-x86_64 +0 -0
- data/utils/launchers/launcher-win32-i86pc.exe +0 -0
- metadata +404 -0
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
2
|
+
"http://www.w3.org/TR/html4/strict.dtd">
|
3
|
+
<html lang="en">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
6
|
+
<title>Multiple IDs</title>
|
7
|
+
</head>
|
8
|
+
|
9
|
+
<body>
|
10
|
+
<div id="multiple" class="foo"></div>
|
11
|
+
<div id="multiple" class="bar"></div>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,135 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Non-control elements</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<script src="javascript/helpers.js" type="text/javascript" charset="utf-8"></script>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div></div>
|
10
|
+
<div id="outer_container">
|
11
|
+
<div id="header" title="Header and primary navigation" class="profile">
|
12
|
+
<h1 id="first_header" class="primary">Header 1</h1>
|
13
|
+
<ul id="navbar" class="navigation">
|
14
|
+
<li><a></a></li>
|
15
|
+
<li><a id="link_2" title="link_title_2" href="non_control_elements.html" class="external">Link 2</a></li>
|
16
|
+
<li><a id="link_3" title="link_title_3" href="forms_with_input_elements.html" name="bad_attribute" value="bad_attribute" class="external">Link 3</a></li>
|
17
|
+
<li></li>
|
18
|
+
<li id="non_link_1" class="nonlink" title="This is not a link!">Non-link 1</li>
|
19
|
+
<li id="non_link_2">Non-link 2</li>
|
20
|
+
<li>Non-link 3</li>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
<div id="promo" name="invalid_attribute" value="invalid_attribute">
|
24
|
+
<h2 id="promo_header">Promo</h2>
|
25
|
+
<span id="lead" class="lead" title="Lorem ipsum">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur eu pede. Ut justo. Praesent feugiat, elit in feugiat iaculis, sem risus rutrum justo, eget fermentum dolor arcu non nunc.</span>
|
26
|
+
<span name="invalid_attribute" value="invalid_attribute">Sed pretium metus et quam. Nullam odio dolor, vestibulum non, tempor ut, vehicula sed, sapien. Vestibulum placerat ligula at quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</span>
|
27
|
+
<span>Suspendisse at ipsum a turpis viverra venenatis. Praesent ut nibh. Nullam eu odio. Donec tempor, elit ut lacinia porttitor, augue neque vehicula diam, in elementum ligula nisi a tellus. Aliquam vestibulum ultricies tortor. </span>
|
28
|
+
<span><strong id="descartes" class="descartes">Dubito, <em class="important-class" id="important-id" title="ergo cogito">ergo cogito</em>, ergo sum.</strong></span>
|
29
|
+
<span></span>
|
30
|
+
<h3>Chemical compunds</h3>
|
31
|
+
<ul>
|
32
|
+
<li>Abietic acid, <strong>C20H30O2</strong></li>
|
33
|
+
<li>Acenaphthene, C12H10</li>
|
34
|
+
<li>Acenaphthoquinone, C12H6O2</li>
|
35
|
+
<li>Acenaphthylene, C12H8</li>
|
36
|
+
<li>Acetaldehyde (ethanal), CH3CHO</li>
|
37
|
+
</ul>
|
38
|
+
<ol id="favorite_compounds" class="chemistry">
|
39
|
+
<li>Propanol, CH3CH2CH2OH</li>
|
40
|
+
<li>Ethane, C2H6</li>
|
41
|
+
<li>Hexene, C6H12</li>
|
42
|
+
<li>Acetone, CH3COCH3</li>
|
43
|
+
<li>Ethanol, CH3CH2OH</li>
|
44
|
+
</ol>
|
45
|
+
<ol>
|
46
|
+
<li></li>
|
47
|
+
</ol>
|
48
|
+
</div>
|
49
|
+
<div id="content">
|
50
|
+
<h2>Content</h2>
|
51
|
+
<p id="lead" class="lead" title="Lorem ipsum">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur eu pede. Ut justo. Praesent feugiat, elit in feugiat iaculis, sem risus rutrum justo, eget fermentum dolor arcu non nunc.</p>
|
52
|
+
<p name="invalid_attribute" value="invalid_attribute">Sed pretium metus et quam. Nullam odio dolor, vestibulum non, tempor ut, vehicula sed, sapien. Vestibulum placerat ligula at quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.</p>
|
53
|
+
<p>Suspendisse at ipsum a turpis viverra venenatis. Praesent ut nibh. Nullam eu odio. Donec tempor, elit ut lacinia porttitor, augue neque vehicula diam, in elementum ligula nisi a tellus. Aliquam vestibulum ultricies tortor. </p>
|
54
|
+
<p>Dubito, ergo cogito, ergo sum.</p>
|
55
|
+
<p></p>
|
56
|
+
<pre></pre>
|
57
|
+
<div id="best_language" onclick="this.innerHTML = 'Ruby!'" style="color: red; text-decoration: underline; cursor: pointer;">What's the best programming language?</div>
|
58
|
+
<h2>Ruby RSpec example</h2>
|
59
|
+
<pre class="ruby" id="rspec">
|
60
|
+
browser.pre(:id, "rspec").should exist
|
61
|
+
</pre>
|
62
|
+
<h2>PHP Hello World</h2>
|
63
|
+
<pre class="php">
|
64
|
+
<?php
|
65
|
+
echo "Hello, World!\n";
|
66
|
+
?>
|
67
|
+
</pre>
|
68
|
+
<h2>Ruby Hello World</h2>
|
69
|
+
<pre class="ruby">
|
70
|
+
puts "Hello, World!"
|
71
|
+
</pre>
|
72
|
+
<h2>C++ Hello World</h2>
|
73
|
+
<pre class="c++">
|
74
|
+
main() {
|
75
|
+
cout << "Hello World!\n";
|
76
|
+
return 0;
|
77
|
+
}
|
78
|
+
</pre>
|
79
|
+
<h2>Haskell</h2>
|
80
|
+
<pre class="haskell">main = putStrLn "Hello World"</pre>
|
81
|
+
<h2>Brainfuck</h2>
|
82
|
+
<pre class="brainfuck" title="The brainfuck language is an esoteric programming language noted for its extreme minimalism">
|
83
|
+
++++++++++
|
84
|
+
[>+++++++>++++++++++>+++>+<<<<-] The initial loop to set up useful values in the array
|
85
|
+
>++. Print 'H'
|
86
|
+
>+. Print 'e'
|
87
|
+
+++++++. Print 'l'
|
88
|
+
. Print 'l'
|
89
|
+
+++. Print 'o'
|
90
|
+
>++. Print ' '
|
91
|
+
<<+++++++++++++++. Print 'W'
|
92
|
+
>. Print 'o'
|
93
|
+
+++. Print 'r'
|
94
|
+
------. Print 'l'
|
95
|
+
--------. Print 'd'
|
96
|
+
>+. Print '!'
|
97
|
+
>. Print newline
|
98
|
+
</pre>
|
99
|
+
</div>
|
100
|
+
<div id="html_test" class=some_class title="This is a title" ondblclick="WatirSpec.addMessage('double clicked')">
|
101
|
+
<h1 id="header1">Header 1</h1>
|
102
|
+
<h2 id="header2">Header 2</h2>
|
103
|
+
<h3 id="header3">Header 3</h3>
|
104
|
+
<h4 id="header4">Header 4</h4>
|
105
|
+
<h5 id="header5">Header 5</h5>
|
106
|
+
<h6 id="header6">Header 6</h6>
|
107
|
+
<h6 id="empty_header"></h6>
|
108
|
+
</div>
|
109
|
+
<div id="footer" title="Closing remarks" class="profile">
|
110
|
+
<span class="footer" name="footer" onclick="this.innerHTML = 'This is a footer with text set by Javascript.'">This is a footer.</span>
|
111
|
+
</div>
|
112
|
+
<a href="strip_space ">Space should be stripped from href</a>
|
113
|
+
<div id="hidden" style="display: none;">Not shown</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<div id="messages"></div>
|
117
|
+
|
118
|
+
<div id="ins_tag_test">
|
119
|
+
<ins id="lead" class ="lead" title='Lorem ipsum'>This is an inserted text tag 1</ins>
|
120
|
+
<ins name="invalid_attribute" value="invalid_attribute">This is an inserted text tag 2</ins>
|
121
|
+
<ins>This is an inserted text tag 3</ins>
|
122
|
+
<ins></ins>
|
123
|
+
<ins class="footer" name="footer" onclick="this.innerHTML = 'This is an ins with text set by Javascript.'">This is an ins.</ins>
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div id="del_tag_test">
|
127
|
+
<del id="lead" class ="lead" title='Lorem ipsum'>This is a deleted text tag 1</del>
|
128
|
+
<del name="invalid_attribute" value="invalid_attribute">This is a deleted text tag 2</del>
|
129
|
+
<del>This is a deleted text tag 3</del>
|
130
|
+
<del></del>
|
131
|
+
<del class="footer" name="footer" onclick="this.innerHTML = 'This is a del with text set by Javascript.'">This is a del.</del>
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</body>
|
135
|
+
</html>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
4
|
+
<title>Title</title>
|
5
|
+
<script type="text/javascript" charset="utf-8">
|
6
|
+
document.write('<HTML></HTML>');
|
7
|
+
</script>
|
8
|
+
</head>
|
9
|
+
<body id="id">
|
10
|
+
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
4
|
+
<title>preventDefault() on form submission</title>
|
5
|
+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js" type="text/javascript" charset="utf-8"></script>
|
6
|
+
<script type="text/javascript" charset="utf-8">
|
7
|
+
$(document).ready(function() {
|
8
|
+
$("#foo").submit(function (e) {
|
9
|
+
e.preventDefault();
|
10
|
+
return false;
|
11
|
+
})
|
12
|
+
});
|
13
|
+
</script>
|
14
|
+
</head>
|
15
|
+
<body>
|
16
|
+
<form id="foo" action="forms_with_input_elements.html" method="get" accept-charset="utf-8">
|
17
|
+
<p><input type="submit" id="next" value="Continue"></p>
|
18
|
+
</form>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
4
|
+
<title>Right Click Test</title>
|
5
|
+
<script src="javascript/helpers.js" type="text/javascript" charset="utf-8"></script>
|
6
|
+
</head>
|
7
|
+
<body>
|
8
|
+
<div id="messages"></div>
|
9
|
+
<div id="click" oncontextmenu='WatirSpec.addMessage("right-clicked")'>Right click!</div>
|
10
|
+
</body>
|
11
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS" />
|
6
|
+
<title>
|
7
|
+
Shift_JIS
|
8
|
+
</title>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<p>
|
12
|
+
�{���͐��V�Ȃ�B
|
13
|
+
</p>
|
14
|
+
<input type="text" id="charset" value="">
|
15
|
+
<input type="text" id="�{���͐��V�Ȃ�B" value="">
|
16
|
+
</body>
|
17
|
+
</html>
|
@@ -0,0 +1,121 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Tables</title>
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
+
<script src="javascript/helpers.js" type="text/javascript" charset="utf-8"></script>
|
7
|
+
</head>
|
8
|
+
<body>
|
9
|
+
<div id="messages"></div>
|
10
|
+
<h1>Tables</h1>
|
11
|
+
<h2>Semantic table</h2>
|
12
|
+
<table cellspacing="0" cellpadding="5" rules="groups" frame="box" border="1" id="axis_example" summary="Hugh Laurie made more money than Gregory House in both March and April of 2008.">
|
13
|
+
<caption>Income tax information for Gregory House and Hugh Laurie</caption>
|
14
|
+
<colgroup width="25%" align="left"></colgroup>
|
15
|
+
<colgroup width="25%" span="3" align="right"></colgroup>
|
16
|
+
<thead id="tax_headers">
|
17
|
+
<tr style="border-bottom: 1px solid black;" class="dark" id="thead_row_1">
|
18
|
+
<th></th>
|
19
|
+
<th id="before_tax" axis="cash" abbr="Before tax">Before income tax</th>
|
20
|
+
<th id="tax" axis="cash" abbr="Tax">Income tax</th>
|
21
|
+
<th id="after_tax" axis="cash" abbr="After tax">After income tax</th>
|
22
|
+
</tr>
|
23
|
+
</thead>
|
24
|
+
<tfoot id="tax_totals">
|
25
|
+
<tr class="dark" id="tfoot_row_1">
|
26
|
+
<th axis="sum">Sum</th>
|
27
|
+
<td headers="before_tax">24 349</td>
|
28
|
+
<td headers="tax">5 577</td>
|
29
|
+
<td headers="after_tax">18 722</td>
|
30
|
+
</tr>
|
31
|
+
</tfoot>
|
32
|
+
<tbody id="first">
|
33
|
+
<tr id="march">
|
34
|
+
<th id="d1" axis="date" scope="rowgroup">March 2008</th>
|
35
|
+
<th></th>
|
36
|
+
<th></th>
|
37
|
+
<th></th>
|
38
|
+
</tr>
|
39
|
+
<tr id="gregory">
|
40
|
+
<td id="p1" abbr="Dr. House">Gregory House</td>
|
41
|
+
<td headers="before_tax p1 d1">5 934</td>
|
42
|
+
<td headers="tax p1 d1">1 347</td>
|
43
|
+
<td headers="after_tax p1 d1">4 587</td>
|
44
|
+
</tr>
|
45
|
+
<tr id="hugh">
|
46
|
+
<td id="p2" abbr="Laurie">Hugh Laurie</td>
|
47
|
+
<td headers="before_tax p2 d1">6 300</td>
|
48
|
+
<td headers="tax p2 d1">1 479</td>
|
49
|
+
<td headers="after_tax p2 d1">4 821</td>
|
50
|
+
</tr>
|
51
|
+
</tbody>
|
52
|
+
<tbody name="second" id="second">
|
53
|
+
<tr>
|
54
|
+
<th id="d2" axis="date" scope="rowgroup">April 2008</th>
|
55
|
+
<th></th>
|
56
|
+
<th></th>
|
57
|
+
<th></th>
|
58
|
+
</tr>
|
59
|
+
<tr>
|
60
|
+
<td id="p3" abbr="Dr. House">Gregory House</td>
|
61
|
+
<td headers="before_tax p3 d2">5 863</td>
|
62
|
+
<td headers="tax p3 d2">1 331</td>
|
63
|
+
<td headers="after_tax p3 d2">4 532</td>
|
64
|
+
</tr>
|
65
|
+
<tr>
|
66
|
+
<td id="p4" abbr="Laurie">Hugh Laurie</td>
|
67
|
+
<td headers="before_tax p4 d2">6 252</td>
|
68
|
+
<td headers="tax p4 d2">1 420</td>
|
69
|
+
<td headers="after_tax p4 d2">4 <span id="cell-child">832</span></td>
|
70
|
+
</tr>
|
71
|
+
</tbody>
|
72
|
+
</table>
|
73
|
+
<h2>Table inside a table</h2>
|
74
|
+
<table border="1" id="outer">
|
75
|
+
<tr id="outer_first">
|
76
|
+
<td>
|
77
|
+
Table 1, Row 1, Cell 1
|
78
|
+
</td>
|
79
|
+
<td>
|
80
|
+
Table 1, Row 1, Cell 2
|
81
|
+
</td>
|
82
|
+
</tr>
|
83
|
+
<tr id="outer_second">
|
84
|
+
<td id="t1_r2_c1">
|
85
|
+
Table 1, Row 2, Cell 1
|
86
|
+
</td>
|
87
|
+
<td id="t1_r2_c2">
|
88
|
+
Table 1, Row 2, Cell 2
|
89
|
+
<table border="1" id="inner" onclick="WatirSpec.addMessage('table')">
|
90
|
+
<tr id="inner_first" onclick="WatirSpec.addMessage('tr')">
|
91
|
+
<td id="t2_r1_c1" onclick="WatirSpec.addMessage('td')">
|
92
|
+
Table 2, Row 1, Cell 1
|
93
|
+
</td>
|
94
|
+
<td>
|
95
|
+
Table 2, Row 1, Cell 2
|
96
|
+
</td>
|
97
|
+
</tr>
|
98
|
+
</table>
|
99
|
+
</td>
|
100
|
+
</tr>
|
101
|
+
<tr id="outer_last">
|
102
|
+
<td>
|
103
|
+
Table 1, Row 3, Cell 1
|
104
|
+
</td>
|
105
|
+
<td>
|
106
|
+
Table 1, Row 3, Cell 2
|
107
|
+
</td>
|
108
|
+
</tr>
|
109
|
+
</table>
|
110
|
+
<h2>Colspan</h2>
|
111
|
+
<table border="1" id="colspan">
|
112
|
+
<tr>
|
113
|
+
<td colspan="2" id="colspan_2">Colspan 2</td>
|
114
|
+
</tr>
|
115
|
+
<tr>
|
116
|
+
<td id="no_colspan">No colspan attribute</td>
|
117
|
+
<td>No colspan attribute</td>
|
118
|
+
</tr>
|
119
|
+
</table>
|
120
|
+
</body>
|
121
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
4
|
+
<title>Timeout Spec</title>
|
5
|
+
<script type="text/javascript" charset="utf-8">
|
6
|
+
function timedAlert() { setTimeout('doAlert()', 500); }
|
7
|
+
function doAlert() { alert('blah'); }
|
8
|
+
function timedChange() { setTimeout('doChange()', 500); }
|
9
|
+
function doChange() { document.getElementById('change').innerHTML = 'all done' }
|
10
|
+
</script>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<div onclick="timedAlert()" id="alert">Trigger alert</div>
|
14
|
+
<div onclick="timedChange()" id="change">Trigger change</div>
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
+
<html lang='en_gb' xml:lang='en_gb' xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
+
<head>
|
4
|
+
<title>
|
5
|
+
Timeout test
|
6
|
+
</title>
|
7
|
+
<meta content='text/html; charset=utf-8' http-equiv='content-type' />
|
8
|
+
<script type='text/javascript'>
|
9
|
+
//<![CDATA[
|
10
|
+
function move_on() {
|
11
|
+
window.location = 'non_control_elements.html';
|
12
|
+
}
|
13
|
+
//]]>
|
14
|
+
</script>
|
15
|
+
</head>
|
16
|
+
<body onload='setTimeout(move_on, 500)'>
|
17
|
+
Wait 3 seconds for the next page.
|
18
|
+
</body>
|
19
|
+
</html>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
</title>
|
8
|
+
<script type="text/javascript" src="http://www.finn.no/clientscript/external/tiny_mce/tiny_mce.js" ></script>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<form action="/finn/admin/iadvert/input" method="post" name="adinput">
|
12
|
+
<input type="hidden" name="usegenericjsp" value="" />
|
13
|
+
|
14
|
+
<script type="text/javascript" language="javascript" src="http://www.finn.no/clientscript/external/tiny_mce/configureTinyMCE.js"></script>
|
15
|
+
<script type="text/javascript">
|
16
|
+
configureTinyMCE("attributes.DESCRIPTION","");
|
17
|
+
</script>
|
18
|
+
<input id="exemption" onclick="toggleExemption()" type="checkbox" name="attributes.MOTOR_PRICE/REREGISTRATION_EXEMPTION" value="1" />
|
19
|
+
<input type="hidden" name="attributes.MOTOR_PRICE/REREGISTRATION_EXEMPTION" value="" />
|
20
|
+
|
21
|
+
|
22
|
+
<legend>Beskrivelse</legend>
|
23
|
+
<textarea cols="40" rows="7" wrap="soft" id="attributes.DESCRIPTION" name="attributes.DESCRIPTION"></textarea>
|
24
|
+
|
25
|
+
</form>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
4
|
+
<head>
|
5
|
+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
|
6
|
+
<title>
|
7
|
+
UTF-8
|
8
|
+
</title>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<p>
|
12
|
+
æåø
|
13
|
+
</p>
|
14
|
+
</body>
|
15
|
+
</html>
|
File without changes
|
@@ -0,0 +1,73 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require File.expand_path("../spec_helper", __FILE__)
|
3
|
+
|
4
|
+
describe "Form" do
|
5
|
+
|
6
|
+
before :each do
|
7
|
+
browser.goto(WatirSpec.files + "/forms_with_input_elements.html")
|
8
|
+
end
|
9
|
+
|
10
|
+
describe "#exists?" do
|
11
|
+
it "returns true if the form exists" do
|
12
|
+
browser.form(:id, 'new_user').should exist
|
13
|
+
browser.form(:id, /new_user/).should exist
|
14
|
+
|
15
|
+
bug "WTR-355", :watir do
|
16
|
+
browser.form(:class, 'user').should exist
|
17
|
+
browser.form(:class, /user/).should exist
|
18
|
+
end
|
19
|
+
|
20
|
+
browser.form(:method, 'post').should exist
|
21
|
+
browser.form(:method, /post/).should exist
|
22
|
+
browser.form(:action, 'post_to_me').should exist
|
23
|
+
browser.form(:action, /to_me/).should exist
|
24
|
+
browser.form(:index, 1).should exist
|
25
|
+
browser.form(:xpath, "//form[@id='new_user']").should exist
|
26
|
+
end
|
27
|
+
|
28
|
+
it "returns the first form if given no args" do
|
29
|
+
browser.form.should exist
|
30
|
+
end
|
31
|
+
|
32
|
+
it "returns true if the element exists (default how = :name)" do
|
33
|
+
browser.form("user_new").should exist
|
34
|
+
end
|
35
|
+
|
36
|
+
it "returns false if the form doesn't exist" do
|
37
|
+
browser.form(:id, 'no_such_id').should_not exist
|
38
|
+
browser.form(:id, /no_such_id/).should_not exist
|
39
|
+
|
40
|
+
bug "WTR-355", :watir do
|
41
|
+
browser.form(:class, 'no_such_class').should_not exist
|
42
|
+
browser.form(:class, /no_such_class/).should_not exist
|
43
|
+
end
|
44
|
+
|
45
|
+
browser.form(:method, 'no_such_method').should_not exist
|
46
|
+
browser.form(:method, /no_such_method/).should_not exist
|
47
|
+
browser.form(:action, 'no_such_action').should_not exist
|
48
|
+
browser.form(:action, /no_such_action/).should_not exist
|
49
|
+
browser.form(:index, 1337).should_not exist
|
50
|
+
browser.form(:xpath, "//form[@id='no_such_id']").should_not exist
|
51
|
+
end
|
52
|
+
|
53
|
+
bug "WTR-356", :watir do
|
54
|
+
it "raises TypeError when 'what' argument is invalid" do
|
55
|
+
lambda { browser.form(:id, 3.14).exists? }.should raise_error(TypeError)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
it "raises MissingWayOfFindingObjectException when 'how' argument is invalid" do
|
60
|
+
lambda { browser.form(:no_such_how, 'some_value').exists? }.should raise_error(MissingWayOfFindingObjectException)
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
describe "#submit" do
|
65
|
+
not_compliant_on :celerity do
|
66
|
+
it "submits the form" do
|
67
|
+
browser.form(:id, "delete_user").submit
|
68
|
+
browser.text.should include("Semantic table")
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|