whirlwind 0.1.0
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/.autotest +23 -0
- data/.gemtest +0 -0
- data/History.txt +6 -0
- data/Manifest.txt +79 -0
- data/README.txt +76 -0
- data/Rakefile +15 -0
- data/bin/whirlwind +99 -0
- data/demo_test_site/demo_site.rb +37 -0
- data/demo_test_site/public/images/arrow_left_48.png +0 -0
- data/demo_test_site/public/images/arrow_right_48.png +0 -0
- data/demo_test_site/public/images/down.gif +0 -0
- data/demo_test_site/public/images/header.jpg +0 -0
- data/demo_test_site/public/images/menu.gif +0 -0
- data/demo_test_site/public/images/menuhover.gif +0 -0
- data/demo_test_site/public/javascripts/browser.menu.js +61 -0
- data/demo_test_site/public/javascripts/cyberconnect_helpers.js +369 -0
- data/demo_test_site/public/javascripts/jquery-1.5.1.min.js +16 -0
- data/demo_test_site/public/javascripts/jquery-1.6.2.min.js +18 -0
- data/demo_test_site/public/javascripts/jquery-ui-1.8.10.custom.min.js +1370 -0
- data/demo_test_site/public/javascripts/jquery.layout.min-1.2.0.js +80 -0
- data/demo_test_site/public/javascripts/jqueryslidemenu.css +93 -0
- data/demo_test_site/public/javascripts/jqueryslidemenu.js +48 -0
- data/demo_test_site/public/javascripts/ui.accordion.js +477 -0
- data/demo_test_site/public/jquery.ui.all.css +11 -0
- data/demo_test_site/public/jquery.ui.base.css +11 -0
- data/demo_test_site/public/jquery.ui.theme.css +252 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-icons_222222_256x240.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-icons_2e83ff_256x240.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-icons_454545_256x240.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-icons_888888_256x240.png +0 -0
- data/demo_test_site/public/jquery_css/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/demo_test_site/public/jquery_css/jquery-ui-1.8.10.custom.css +573 -0
- data/demo_test_site/public/jquery_layout.css +14 -0
- data/demo_test_site/public/jqueryslidemenu.css +93 -0
- data/demo_test_site/public/menu.css +12 -0
- data/demo_test_site/public/style.css +196 -0
- data/demo_test_site/views/index.erb +294 -0
- data/images/.placeholder +0 -0
- data/lib/browser.rb +22 -0
- data/lib/cucumber/formatter/cucumber.css +282 -0
- data/lib/cucumber/formatter/html_image.rb +750 -0
- data/lib/cucumber/formatter/jquery-min.js +154 -0
- data/lib/cucumber.rb +68 -0
- data/lib/duration.rb +13 -0
- data/lib/io.rb +31 -0
- data/lib/ordered_xml_markup.rb +24 -0
- data/lib/rspec.rb +75 -0
- data/lib/watir.rb +105 -0
- data/lib/whirlwind.rb +39 -0
- data/sites/demo/conf/base_urls.yml +6 -0
- data/sites/demo/conf/browser.yaml +1 -0
- data/sites/demo/conf/html_elements.yaml +22 -0
- data/sites/demo/conf/remote_machine.yaml +12 -0
- data/sites/demo/conf/users.yaml +21 -0
- data/sites/demo/elements/demo_common_elements.rb +42 -0
- data/sites/demo/elements/demo_elements.rb +18 -0
- data/sites/demo/elements/demo_registration_elements.rb +27 -0
- data/sites/demo/features/click_links.feature +21 -0
- data/sites/demo/features/register_user.feature +27 -0
- data/sites/demo/features/step_defn/demo.rb +62 -0
- data/sites/demo/flows/home_flows.rb +25 -0
- data/sites/demo/flows/registration_flows.rb +21 -0
- data/sites/demo/results/.placeholder +0 -0
- data/test/features/browser_types.feature +22 -0
- data/test/features/open_browser.feature +20 -0
- data/test/features/resource_size.feature +13 -0
- data/test/features/step_defn/browser.rb +61 -0
- data/test/test_whirlwind.rb +8 -0
- metadata +198 -0
@@ -0,0 +1,93 @@
|
|
1
|
+
.jqueryslidemenu{
|
2
|
+
font: bold 12px Verdana;
|
3
|
+
/*background: #666;*/
|
4
|
+
height: 30px;
|
5
|
+
}
|
6
|
+
|
7
|
+
.jqueryslidemenu ul{
|
8
|
+
margin: 0;
|
9
|
+
/*padding-top: 5px;*/
|
10
|
+
list-style-type: none;
|
11
|
+
z-index: 1
|
12
|
+
}
|
13
|
+
|
14
|
+
/*Top level list items*/
|
15
|
+
.jqueryslidemenu ul li{
|
16
|
+
position: relative;
|
17
|
+
/*top: -5px;*/
|
18
|
+
display: inline;
|
19
|
+
float: left;
|
20
|
+
}
|
21
|
+
|
22
|
+
/*Top level menu link items style*/
|
23
|
+
.jqueryslidemenu ul li a{
|
24
|
+
display: block;
|
25
|
+
background: #666; /*background of tabs (default state)*/
|
26
|
+
color: white;
|
27
|
+
/*padding: 8px 2px 0 2px;*/
|
28
|
+
border-right: 1px solid #778;
|
29
|
+
color: #2d2b2b;
|
30
|
+
text-decoration: none;
|
31
|
+
|
32
|
+
}
|
33
|
+
|
34
|
+
* html .jqueryslidemenu ul li a{ /*IE6 hack to get sub menu links to behave correctly*/
|
35
|
+
display: inline-block;
|
36
|
+
}
|
37
|
+
|
38
|
+
.jqueryslidemenu ul li a:link, .jqueryslidemenu ul li a:visited{
|
39
|
+
}
|
40
|
+
|
41
|
+
.jqueryslidemenu ul li a:hover{
|
42
|
+
background: #666;
|
43
|
+
color: white;
|
44
|
+
}
|
45
|
+
|
46
|
+
/*1st sub level menu*/
|
47
|
+
.jqueryslidemenu ul li ul{
|
48
|
+
position: absolute;
|
49
|
+
left: 0;
|
50
|
+
display: block;
|
51
|
+
visibility: hidden;
|
52
|
+
}
|
53
|
+
|
54
|
+
/*Sub level menu list items (undo style from Top level List Items)*/
|
55
|
+
.jqueryslidemenu ul li ul li{
|
56
|
+
display: list-item;
|
57
|
+
float: none;
|
58
|
+
/*padding: 2px 2px 0 2px;*/
|
59
|
+
}
|
60
|
+
|
61
|
+
/*All subsequent sub menu levels vertical offset after 1st level sub menu */
|
62
|
+
.jqueryslidemenu ul li ul li ul{
|
63
|
+
top: 0;
|
64
|
+
}
|
65
|
+
|
66
|
+
/* Sub level menu links style */
|
67
|
+
.jqueryslidemenu ul li ul li a{
|
68
|
+
font: normal 13px Verdana;
|
69
|
+
width: 160px; /*width of sub menus*/
|
70
|
+
/* padding: 5px; */
|
71
|
+
margin: 0;
|
72
|
+
border-top-width: 0;
|
73
|
+
border-bottom: 1px solid gray;
|
74
|
+
}
|
75
|
+
|
76
|
+
.jqueryslidemenuz ul li ul li a:hover{ /*sub menus hover style*/
|
77
|
+
background: #666;
|
78
|
+
color: black;
|
79
|
+
}
|
80
|
+
|
81
|
+
/* ######### CSS classes applied to down and right arrow images ######### */
|
82
|
+
|
83
|
+
.downarrowclass{
|
84
|
+
position: absolute;
|
85
|
+
/*top: 12px;*/
|
86
|
+
right: 7px;
|
87
|
+
}
|
88
|
+
|
89
|
+
.rightarrowclass{
|
90
|
+
position: absolute;
|
91
|
+
/*top: 6px;*/
|
92
|
+
right: 5px;
|
93
|
+
}
|
@@ -0,0 +1,196 @@
|
|
1
|
+
body {
|
2
|
+
font-family: Verdana, Arial, Helvetica, sans-serif;
|
3
|
+
font-size: 13px;
|
4
|
+
color: #666666;
|
5
|
+
background-color: #FFFFFF;
|
6
|
+
background-repeat: repeat-x;
|
7
|
+
margin: 0px;
|
8
|
+
padding: 0px;
|
9
|
+
}
|
10
|
+
|
11
|
+
#wrap #body_content #left h4 {
|
12
|
+
font-family: Arial, Helvetica, sans-serif;
|
13
|
+
font-size: 14px;
|
14
|
+
font-weight: bold;
|
15
|
+
color: #98785B;
|
16
|
+
padding: 0 0 0 0;
|
17
|
+
|
18
|
+
}
|
19
|
+
|
20
|
+
.hidden { display:none; }
|
21
|
+
#wrap #body_content #left h1 {
|
22
|
+
font-family: Arial, Helvetica, sans-serif;
|
23
|
+
font-size: 24px;
|
24
|
+
font-weight: normal;
|
25
|
+
color: #98785B;
|
26
|
+
}
|
27
|
+
#wrap #body_content #left p {
|
28
|
+
line-height: 20px;
|
29
|
+
}
|
30
|
+
#wrap {
|
31
|
+
margin-top: 0px;
|
32
|
+
margin-right: 3%;
|
33
|
+
margin-left: 3%;
|
34
|
+
}
|
35
|
+
#wrap #body_content #left {
|
36
|
+
}
|
37
|
+
#wrap #header {
|
38
|
+
height: 145px;
|
39
|
+
margin: 0px;
|
40
|
+
padding: 0px;
|
41
|
+
}
|
42
|
+
#wrap #header #topnavigation {
|
43
|
+
left: -290px;
|
44
|
+
z-index: 1;
|
45
|
+
height: 30px;
|
46
|
+
margin-left: 350px;
|
47
|
+
}
|
48
|
+
#wrap #body_content #left blockquote {
|
49
|
+
margin: 15px;
|
50
|
+
background-color: #EBE9ED;
|
51
|
+
border-left-width: 5px;
|
52
|
+
border-left-style: solid;
|
53
|
+
border-left-color: #90C3E6;
|
54
|
+
padding-top: 0px;
|
55
|
+
padding-right: 0px;
|
56
|
+
padding-bottom: 0px;
|
57
|
+
padding-left: 15px;
|
58
|
+
}
|
59
|
+
|
60
|
+
label {
|
61
|
+
margin-right: 2px;
|
62
|
+
position: relative;
|
63
|
+
top: 4px;
|
64
|
+
}
|
65
|
+
|
66
|
+
input.error {
|
67
|
+
border-color: red;
|
68
|
+
}
|
69
|
+
|
70
|
+
div.form_error {
|
71
|
+
color: red;
|
72
|
+
|
73
|
+
position: relative;
|
74
|
+
top: -18px;
|
75
|
+
left: 300px;
|
76
|
+
}
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
#wrap #header #topnavigation a {
|
83
|
+
|
84
|
+
/*background-image: url(/images/menu.gif); */
|
85
|
+
background-repeat: no-repeat;
|
86
|
+
text-align: center;
|
87
|
+
height: 14px;
|
88
|
+
position: relative;
|
89
|
+
top: 4px;
|
90
|
+
padding-top: 5px;
|
91
|
+
/* width: 92px; */
|
92
|
+
text-decoration: none;
|
93
|
+
font-family: Arial, Helvetica, sans-serif;
|
94
|
+
font-size: 12px;
|
95
|
+
}
|
96
|
+
|
97
|
+
#main_menu {
|
98
|
+
height: 34px;
|
99
|
+
z-index: 1;
|
100
|
+
}
|
101
|
+
|
102
|
+
#wrap #body_content {
|
103
|
+
margin-top: 15px;
|
104
|
+
margin-bottom: 15px;
|
105
|
+
position: relative;
|
106
|
+
top: 14px;
|
107
|
+
}
|
108
|
+
|
109
|
+
.clear { clear: both; }
|
110
|
+
|
111
|
+
#wrap #body_content #left h3 { font-family: Arial, Helvetica, sans-serif; color: #333333; }
|
112
|
+
|
113
|
+
#wrap #header #topnavigation a:visited,active {
|
114
|
+
/* background-image: url(/images/menu.gif); */
|
115
|
+
background-repeat: no-repeat;
|
116
|
+
text-align: center;
|
117
|
+
padding-top: 5px;
|
118
|
+
display: block;
|
119
|
+
width: 92px;
|
120
|
+
/*color: #4E4E4E;*/
|
121
|
+
color: white;
|
122
|
+
text-decoration: none;
|
123
|
+
font-family: Arial, Helvetica, sans-serif;
|
124
|
+
font-size: 12px;
|
125
|
+
}
|
126
|
+
#wrap #header #topnavigation a:hover {
|
127
|
+
/*background-image: url(/images/menuhover.gif); */
|
128
|
+
background-repeat: no-repeat;
|
129
|
+
text-align: center;
|
130
|
+
height: 14px;
|
131
|
+
display: block;
|
132
|
+
color: white;
|
133
|
+
/* width: 92px;
|
134
|
+
color: #FFFFFF;
|
135
|
+
*/
|
136
|
+
text-decoration: none;
|
137
|
+
font-family: Arial, Helvetica, sans-serif;
|
138
|
+
font-size: 12px;
|
139
|
+
}
|
140
|
+
#wrap #header #topnavigation .current a:visited,active {
|
141
|
+
background-image: url(/images/menuhover.gif);
|
142
|
+
background-repeat: no-repeat;
|
143
|
+
text-align: center;
|
144
|
+
height: 16px;
|
145
|
+
padding-top: 5px;
|
146
|
+
display: block;
|
147
|
+
width: 92px;
|
148
|
+
color: white;
|
149
|
+
/*color: #FFFFFF;*/
|
150
|
+
text-decoration: none;
|
151
|
+
font-family: Arial, Helvetica, sans-serif;
|
152
|
+
font-size: 12px;
|
153
|
+
}
|
154
|
+
#wrap #header #topnavigation .current a {
|
155
|
+
background-image: url(/images/menuhover.gif);
|
156
|
+
background-repeat: no-repeat;
|
157
|
+
text-align: center;
|
158
|
+
height: 16px;
|
159
|
+
padding-top: 5px;
|
160
|
+
display: block;
|
161
|
+
width: 92px;
|
162
|
+
color: white;
|
163
|
+
/*color: #FFFFFF;*/
|
164
|
+
text-decoration: none;
|
165
|
+
font-family: Arial, Helvetica, sans-serif;
|
166
|
+
font-size: 12px;
|
167
|
+
}
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
#skip_page {
|
186
|
+
border: solid 1px;
|
187
|
+
height: 800px;
|
188
|
+
}
|
189
|
+
/*
|
190
|
+
#complete_checkout {
|
191
|
+
height: 800px;
|
192
|
+
}
|
193
|
+
#step_1 {
|
194
|
+
height: 380px;
|
195
|
+
}
|
196
|
+
*/
|
@@ -0,0 +1,294 @@
|
|
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">
|
3
|
+
<head>
|
4
|
+
<title>Demo Test Page for QA Robusta</title>
|
5
|
+
<script type="text/javascript" src="/javascripts/jquery-1.5.1.min.js"></script>
|
6
|
+
<!-- <script type="text/javascript" src="/javascripts/jquery-1.6.2.min.js"></script> -->
|
7
|
+
|
8
|
+
<script src='/javascripts/jquery-ui-1.8.10.custom.min.js' type='text/javascript'></script>
|
9
|
+
<script src='/javascripts/cyberconnect_helpers.js' type='text/javascript'></script>
|
10
|
+
<!-- <script src='/javascripts/ui.accordion.js' type='text/javascript'></script> -->
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
<link href="/style.css" rel="stylesheet" type="text/css" />
|
15
|
+
<link href="/menu.css" rel="stylesheet" type="text/css" />
|
16
|
+
<link href="/jqueryslidemenu.css" rel="stylesheet" type="text/css" />
|
17
|
+
<link href="/jquery_css/jquery-ui-1.8.10.custom.css" rel='stylesheet' type="text/css">
|
18
|
+
|
19
|
+
<script src="/javascripts/browser.menu.js" type="text/javascript"></script>
|
20
|
+
<script src="/javascripts/jqueryslidemenu.js" type="text/javascript"></script>
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
<script type="text/javascript">
|
26
|
+
$(function() {
|
27
|
+
function setup_layout() { $('#step_1').height($($('#step_1').find('fieldset')[0]).height() + 60) }
|
28
|
+
$('#main_menu').buildmenu();
|
29
|
+
$('#tabs').tabs({ show: function(event, ui) { setup_layout(); }});
|
30
|
+
$('a#test_alert').click(function() { alert('QA Robusta Test Alert')});
|
31
|
+
$('a#open_test_modal_dialog').click(function() { $('#test_modal_dialog').dialog({modal: true})});
|
32
|
+
$('a#open_test_dialog').click(function() { $('#test_dialog').dialog()});
|
33
|
+
|
34
|
+
$('a#step_nav').click(function() {
|
35
|
+
var i = this.title.split(' ');
|
36
|
+
var step_n = parseInt(i[4]);
|
37
|
+
var max_steps = 4;
|
38
|
+
|
39
|
+
$('h3#header_step_' + step_n).find('a').click();
|
40
|
+
});
|
41
|
+
|
42
|
+
function step_validator(step_n){
|
43
|
+
if(step_n == 1)
|
44
|
+
var res = step1_validator();
|
45
|
+
else if(step_n == 2)
|
46
|
+
var res = step2_validator();
|
47
|
+
return res;
|
48
|
+
}
|
49
|
+
|
50
|
+
function step1_validator(){
|
51
|
+
remove_field_errors('step_1');
|
52
|
+
$("#contact_errors").empty();
|
53
|
+
$("#login_errors").empty();
|
54
|
+
var email = $('#email').val();
|
55
|
+
var password = $('#password').val();
|
56
|
+
var res = false;
|
57
|
+
var errors = [];
|
58
|
+
var fields = ['email', 'password'];
|
59
|
+
|
60
|
+
for(i in fields) {
|
61
|
+
eval("field=" + fields[i])
|
62
|
+
if(field == '')
|
63
|
+
errors[i] = {field: fields[i], msg: 'Enter a value'};
|
64
|
+
}
|
65
|
+
|
66
|
+
if(errors.length == 0) {
|
67
|
+
return true;
|
68
|
+
} else {
|
69
|
+
style_form_errors(errors);
|
70
|
+
return false;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
function step2_validator(){
|
75
|
+
remove_field_errors('step_2');
|
76
|
+
$("#additional_email_errors").empty();
|
77
|
+
$("#contact_errors").empty();
|
78
|
+
var first_name = $('#first_name').val();
|
79
|
+
var last_name = $('#last_name').val();
|
80
|
+
var phone = $('#phone').val();
|
81
|
+
var street_address = $('#street_address').val();
|
82
|
+
var address_line_two = $('#address_line_two').val();
|
83
|
+
var city = $('#city').val();
|
84
|
+
var state = $('#state').val();
|
85
|
+
var zip_code = $('#zip_code').val();
|
86
|
+
var errors = [];
|
87
|
+
var fields = ['first_name', 'last_name', 'phone', 'street_address', 'city', 'state', 'zip_code'];
|
88
|
+
for(i in fields) {
|
89
|
+
eval("field=" + fields[i])
|
90
|
+
if(field == '')
|
91
|
+
errors[i] = {field: fields[i], msg: 'Enter a value'};
|
92
|
+
}
|
93
|
+
|
94
|
+
if(errors.length == 0) {
|
95
|
+
return true;
|
96
|
+
} else {
|
97
|
+
style_form_errors(errors);
|
98
|
+
return false;
|
99
|
+
}
|
100
|
+
}
|
101
|
+
|
102
|
+
var complete_checkout_ops = {
|
103
|
+
changestart: function(event) {
|
104
|
+
var current_step = parseInt($('h3.ui-state-active').html().match(/Step [0-9]/)[0].replace('Step ', ''))
|
105
|
+
var next_step = parseInt(event.currentTarget.innerHTML.match(/Step [0-9]/)[0].replace('Step ', ''))
|
106
|
+
if(next_step > current_step)
|
107
|
+
return step_res = step_validator(current_step);
|
108
|
+
else
|
109
|
+
return true;
|
110
|
+
},
|
111
|
+
|
112
|
+
changend: function(event) {
|
113
|
+
var next_step = parseInt(event.currentTarget.innerHTML.match(/Step [0-9]/)[0].replace('Step ', ''))
|
114
|
+
},
|
115
|
+
on_complete: function(step) {
|
116
|
+
step = $(step.active).attr('id').replace('header_', '');
|
117
|
+
$('#' + step).height($($('#' + step).find('fieldset')[0]).height() + 60);
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
$( "#complete_checkout" ).accordion(complete_checkout_ops)
|
122
|
+
$('input#create_file').click(function() {
|
123
|
+
$('#create_file_status').empty();
|
124
|
+
file_name = $('input#create_file_name').attr('value')
|
125
|
+
if(file_name.length > 0) {
|
126
|
+
$.ajax({ url: '/create_tmp_file', dataType: 'json', type: 'post', data: {file_name: file_name},
|
127
|
+
success: function(res) {
|
128
|
+
if(res.results)
|
129
|
+
$('#create_file_status').append('file created');
|
130
|
+
else
|
131
|
+
$('#create_file_status').append('unable to create file');
|
132
|
+
}
|
133
|
+
});
|
134
|
+
} else {
|
135
|
+
$('#create_file_status').append('Please provide a file name');
|
136
|
+
}
|
137
|
+
});
|
138
|
+
});
|
139
|
+
|
140
|
+
</script>
|
141
|
+
|
142
|
+
</head>
|
143
|
+
<body>
|
144
|
+
|
145
|
+
<div id='wrap'>
|
146
|
+
<div id='header'>
|
147
|
+
<div id="logo"> <img src='/images/header.jpg'> </div>
|
148
|
+
<div id="topnavigation">
|
149
|
+
<div id="main_menu" class="jqueryslidemenu">
|
150
|
+
<ul>
|
151
|
+
<li><a href='' id='menu_actions'>Actions</a>
|
152
|
+
<ul>
|
153
|
+
<li><a id='test_alert'>Test Alert</a></li>
|
154
|
+
<li><a id='open_test_modal_dialog'>Test Modal Dialog</a></li>
|
155
|
+
<li><a id='open_test_dialog'>Test Dialog</a></li>
|
156
|
+
</ul>
|
157
|
+
</li>
|
158
|
+
</ul>
|
159
|
+
</div>
|
160
|
+
</div>
|
161
|
+
</div>
|
162
|
+
<div id='body_content'>
|
163
|
+
<div id='left'>
|
164
|
+
<div id='test_modal_dialog' class='hidden'>Test some modal dialog actions</div>
|
165
|
+
<div id='test_dialog' class='hidden'>Test some dialog actions</div>
|
166
|
+
<div id='tabs'>
|
167
|
+
<ul>
|
168
|
+
<li><a href="#tab_base">Base test page</a></li>
|
169
|
+
<li><a href="#tab_user_reg">User Registration</a></li>
|
170
|
+
</ul>
|
171
|
+
<div id='tab_base'>
|
172
|
+
<div id='create_file_status'></div>
|
173
|
+
<input type='text' id='create_file_name'>
|
174
|
+
<input type='button' id='create_file' value='Create Tmp File'><br><br>
|
175
|
+
<div id='skip_page'></div><div id='skip_page'></div><div id='skip_page'></div><div id='skip_page'></div>
|
176
|
+
<a href='with_id' id='link_with_id_and_no_name'>with id and no name</a>
|
177
|
+
<div id='skip_page'></div><div id='skip_page'></div><div id='skip_page'></div><div id='skip_page'></div>
|
178
|
+
<a href='with_name' name='link_with_no_id_but_has_name'>with name and no id</a>
|
179
|
+
<div id='skip_page'></div><div id='skip_page'></div><div id='skip_page'></div><div id='skip_page'></div>
|
180
|
+
</div>
|
181
|
+
<div id='tab_user_reg'>
|
182
|
+
<div id="complete_checkout">
|
183
|
+
<h3 id='header_step_1'><a href='#'>Step 1: Create User</a></h3>
|
184
|
+
<div id='step_1'>
|
185
|
+
<fieldset> <br>
|
186
|
+
<div id='login_errors' class='errors'></div><br>
|
187
|
+
<label id='step_1' class='step_1' for="email"><span class="labelText">Email</span></label>
|
188
|
+
<input type='text' id = 'email' name = 'email' value='' >
|
189
|
+
<div name="email_error" id="email_error" class='form_error' style='hidden'/></div> <br>
|
190
|
+
<label id='step_1' class='step_1' for="password"><span class="labelText">Password</span></label>
|
191
|
+
<input type='password' id = 'password' name = 'password' value='' >
|
192
|
+
<div name="password_error" id="password_error" class='form_error' style='hidden'/></div> <br>
|
193
|
+
<div id='step_navigation_left'><a id='step_nav' title='Move on to Step 2'><img src='/images/arrow_right_48.png'></a> </div>
|
194
|
+
</fieldset>
|
195
|
+
<input type='hidden' id='step_1_active' value='true'>
|
196
|
+
<input type='hidden' id='step_1_h3_class' value=''>
|
197
|
+
<input type='hidden' value='step_1_true'>
|
198
|
+
</div>
|
199
|
+
<h3 id='header_step_2'><a href='#'>Step 2:Contact Information</a></h3>
|
200
|
+
<div id='step_2'>
|
201
|
+
<fieldset>
|
202
|
+
<br><label class='step_2' for="contact"><span class="labelText">First Name</span></label>
|
203
|
+
<input type='text' id='first_name' name='first_name' value='' >
|
204
|
+
<div class='form_error' name="first_name_error" id="first_name_error" style='hidden'/></div> <br>
|
205
|
+
<label class='step_2' for="contact"><span class="labelText">Last Name</span></label>
|
206
|
+
<input type='text' id='last_name' name='last_name' value='' >
|
207
|
+
<div class='form_error' name="last_name_error" id="last_name_error" style='hidden'/></div> <br>
|
208
|
+
<label class='step_2' for="contact"><span class="labelText">Phone</span></label>
|
209
|
+
<input type='text' id='phone' name='phone' value='' >
|
210
|
+
<div class='form_error' name="phone_error" id="phone_error" style='hidden'/></div> <br>
|
211
|
+
<label class='step_2' for="contact"><span class="labelText">Address</span></label>
|
212
|
+
<input type='text' id='street_address' name='street_address' value='' >
|
213
|
+
<div class='form_error' name="street_address_error" id="street_address_error" style='hidden'/></div> <br>
|
214
|
+
<label class='step_2' for="contact"><span class="labelText">Address Line 2</span></label>
|
215
|
+
<input type='text' id='address_line_two' name='address_line_two' value='' >
|
216
|
+
<div class='form_error' name="address_line_two_error" id="address_line_two_error" style='hidden'/></div> <br>
|
217
|
+
<label class='step_2' for="contact"><span class="labelText">City</span></label>
|
218
|
+
<input type='text' id='city' name='city' value='' >
|
219
|
+
<div class='form_error' name="city_error" id="city_error" style='hidden'/></div> <br>
|
220
|
+
<label class='step_2' for="contact"><span class="labelText">State</span></label>
|
221
|
+
<input type='hidden' id='selected_state' value=''>
|
222
|
+
<select name="state" id="state">
|
223
|
+
<option value="" selected="selected">Select a State</option>
|
224
|
+
<option value="AL">Alabama</option>
|
225
|
+
<option value="AK">Alaska</option>
|
226
|
+
<option value="AZ">Arizona</option>
|
227
|
+
<option value="AR">Arkansas</option>
|
228
|
+
<option value="CA">California</option>
|
229
|
+
<option value="CO">Colorado</option>
|
230
|
+
<option value="CT">Connecticut</option>
|
231
|
+
<option value="DE">Delaware</option>
|
232
|
+
<option value="DC">District Of Columbia</option>
|
233
|
+
<option value="FL">Florida</option>
|
234
|
+
<option value="GA">Georgia</option>
|
235
|
+
<option value="HI">Hawaii</option>
|
236
|
+
<option value="ID">Idaho</option>
|
237
|
+
<option value="IL">Illinois</option>
|
238
|
+
<option value="IN">Indiana</option>
|
239
|
+
<option value="IA">Iowa</option>
|
240
|
+
<option value="KS">Kansas</option>
|
241
|
+
<option value="KY">Kentucky</option>
|
242
|
+
<option value="LA">Louisiana</option>
|
243
|
+
<option value="ME">Maine</option>
|
244
|
+
<option value="MD">Maryland</option>
|
245
|
+
<option value="MA">Massachusetts</option>
|
246
|
+
<option value="MI">Michigan</option>
|
247
|
+
<option value="MN">Minnesota</option>
|
248
|
+
<option value="MS">Mississippi</option>
|
249
|
+
<option value="MO">Missouri</option>
|
250
|
+
<option value="MT">Montana</option>
|
251
|
+
<option value="NE">Nebraska</option>
|
252
|
+
<option value="NV">Nevada</option>
|
253
|
+
<option value="NH">New Hampshire</option>
|
254
|
+
<option value="NJ">New Jersey</option>
|
255
|
+
<option value="NM">New Mexico</option>
|
256
|
+
<option value="NY">New York</option>
|
257
|
+
<option value="NC">North Carolina</option>
|
258
|
+
<option value="ND">North Dakota</option>
|
259
|
+
<option value="OH">Ohio</option>
|
260
|
+
<option value="OK">Oklahoma</option>
|
261
|
+
<option value="OR">Oregon</option>
|
262
|
+
<option value="PA">Pennsylvania</option>
|
263
|
+
<option value="RI">Rhode Island</option>
|
264
|
+
<option value="SC">South Carolina</option>
|
265
|
+
<option value="SD">South Dakota</option>
|
266
|
+
<option value="TN">Tennessee</option>
|
267
|
+
<option value="TX">Texas</option>
|
268
|
+
<option value="UT">Utah</option>
|
269
|
+
<option value="VT">Vermont</option>
|
270
|
+
<option value="VA">Virginia</option>
|
271
|
+
<option value="WA">Washington</option>
|
272
|
+
<option value="WV">West Virginia</option>
|
273
|
+
<option value="WI">Wisconsin</option>
|
274
|
+
<option value="WY">Wyoming</option>
|
275
|
+
</select>
|
276
|
+
<div class='form_error' name="state_error" id="state_error" style='hidden'/></div> <br>
|
277
|
+
<label class='step_2' for="contact"><span class="labelText">Zip</span></label>
|
278
|
+
<input type='text' id='zip_code' name='zip_code' value='' >
|
279
|
+
<div class='form_error' name="zip_code_error" id="zip_code_error" style='hidden'/></div> <br>
|
280
|
+
<div id='step_navigation_left'>
|
281
|
+
<a id='step_nav' title='Go back to Step 1' ><img src='/images/arrow_left_48.png'></a>
|
282
|
+
<a id='step_nav' title='Move on to Step 3'><img src='/images/arrow_right_48.png'></a>
|
283
|
+
</div>
|
284
|
+
</fieldset>
|
285
|
+
<input type='hidden' id='step_2_active' value='false'>
|
286
|
+
<input type='hidden' id='step_2_h3_class' value=''>
|
287
|
+
</div>
|
288
|
+
</div>
|
289
|
+
</div>
|
290
|
+
</div>
|
291
|
+
</div>
|
292
|
+
|
293
|
+
</body>
|
294
|
+
</html>
|
data/images/.placeholder
ADDED
File without changes
|
data/lib/browser.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'watir-webdriver'
|
3
|
+
|
4
|
+
module Constants
|
5
|
+
ALLOWED_BROWSERS = [:ff, :firefox, :chrome, :ie]
|
6
|
+
end
|
7
|
+
|
8
|
+
module Site
|
9
|
+
def self.browser(params={}, &blk)
|
10
|
+
params[:browser] ||= ''
|
11
|
+
p params.inspect
|
12
|
+
raise ArgumentError unless Constants::ALLOWED_BROWSERS.include?(params[:browser].to_sym)
|
13
|
+
|
14
|
+
@browser = Watir::Browser.new params[:browser].to_sym
|
15
|
+
|
16
|
+
if block_given?
|
17
|
+
yield @browser
|
18
|
+
else
|
19
|
+
return @browser
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|