line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Brownie::Session; |
2
|
|
|
|
|
|
|
|
3
|
19
|
|
|
19
|
|
258000
|
use strict; |
|
19
|
|
|
|
|
428
|
|
|
19
|
|
|
|
|
785
|
|
4
|
19
|
|
|
19
|
|
101
|
use warnings; |
|
19
|
|
|
|
|
35
|
|
|
19
|
|
|
|
|
468
|
|
5
|
19
|
|
|
19
|
|
110
|
use Carp (); |
|
19
|
|
|
|
|
44
|
|
|
19
|
|
|
|
|
319
|
|
6
|
19
|
|
|
19
|
|
17737
|
use Class::Load; |
|
19
|
|
|
|
|
728883
|
|
|
19
|
|
|
|
|
963
|
|
7
|
19
|
|
|
19
|
|
181
|
use Sub::Install; |
|
19
|
|
|
|
|
46
|
|
|
19
|
|
|
|
|
253
|
|
8
|
19
|
|
|
19
|
|
26313
|
use Plack::Runner; |
|
19
|
|
|
|
|
235174
|
|
|
19
|
|
|
|
|
738
|
|
9
|
19
|
|
|
19
|
|
13933
|
use Test::TCP; |
|
19
|
|
|
|
|
1181486
|
|
|
19
|
|
|
|
|
1370
|
|
10
|
|
|
|
|
|
|
|
11
|
19
|
|
|
19
|
|
8243
|
use Brownie::Driver; |
|
19
|
|
|
|
|
53
|
|
|
19
|
|
|
|
|
488
|
|
12
|
19
|
|
|
19
|
|
10920
|
use Brownie::Node; |
|
19
|
|
|
|
|
57
|
|
|
19
|
|
|
|
|
1833
|
|
13
|
19
|
|
|
19
|
|
15780
|
use Brownie::XPath; |
|
19
|
|
|
|
|
57
|
|
|
19
|
|
|
|
|
31629
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub new { |
16
|
17
|
|
|
17
|
1
|
25144
|
my ($class, %args) = @_; |
17
|
|
|
|
|
|
|
|
18
|
17
|
|
|
|
|
180
|
my $self = +{ |
19
|
|
|
|
|
|
|
scopes => [], |
20
|
|
|
|
|
|
|
driver => $class->_create_driver($args{driver}), |
21
|
|
|
|
|
|
|
app_host => $args{app_host}, |
22
|
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
17
|
100
|
|
|
|
158
|
if ($args{app}) { |
25
|
10
|
|
|
|
|
69
|
my $server = $class->_create_server($args{app}); |
26
|
10
|
50
|
|
|
|
841970
|
if ($server) { |
27
|
10
|
|
|
|
|
191
|
$self->{server} = $server; |
28
|
10
|
|
|
|
|
144
|
$self->{app_host} = 'http://localhost:' . $server->port; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
17
|
|
|
|
|
1423
|
return bless $self => $class; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub DESTROY { |
36
|
17
|
|
|
17
|
|
311048
|
my $self = shift; |
37
|
17
|
50
|
|
|
|
231
|
delete $self->{driver} if exists $self->{driver}; |
38
|
17
|
100
|
|
|
|
794
|
delete $self->{server} if exists $self->{server}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _create_driver { |
42
|
17
|
|
|
17
|
|
45
|
my ($class, $opts) = @_; |
43
|
|
|
|
|
|
|
|
44
|
17
|
|
100
|
|
|
156
|
$opts ||= { name => 'Mechanize' }; |
45
|
17
|
100
|
|
|
|
88
|
$opts = { name => $opts } unless ref $opts; |
46
|
|
|
|
|
|
|
|
47
|
17
|
|
33
|
|
|
140
|
my $klass = $opts->{class} || 'Brownie::Driver::' . $opts->{name}; |
48
|
17
|
|
|
|
|
141
|
Class::Load::load_class($klass); |
49
|
|
|
|
|
|
|
|
50
|
17
|
50
|
|
|
|
1116
|
return $klass->new(%{ $opts->{args} || {} }); |
|
17
|
|
|
|
|
306
|
|
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub _create_server { |
54
|
10
|
|
|
10
|
|
33
|
my ($class, $app, %args) = @_; |
55
|
10
|
50
|
|
|
|
44
|
return unless $app; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
my $server = Test::TCP->new( |
58
|
|
|
|
|
|
|
code => sub { |
59
|
0
|
|
|
0
|
|
0
|
my $port = shift; |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
0
|
my $r = Plack::Runner->new(app => $app); |
62
|
0
|
|
|
|
|
0
|
$r->parse_options('--port' => $port, '--env' => 'test'); |
63
|
0
|
|
|
|
|
0
|
$r->set_options(%args); |
64
|
0
|
|
|
|
|
0
|
$r->run; |
65
|
|
|
|
|
|
|
}, |
66
|
10
|
|
|
|
|
197
|
); |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
327
|
|
|
327
|
1
|
2429
|
sub driver { shift->{driver} } |
70
|
2
|
|
|
2
|
0
|
89
|
sub server { shift->{server} } |
71
|
169
|
|
|
169
|
0
|
1771
|
sub app_host { shift->{app_host} } |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
for my $method (qw/ |
74
|
|
|
|
|
|
|
current_url |
75
|
|
|
|
|
|
|
current_path |
76
|
|
|
|
|
|
|
status_code |
77
|
|
|
|
|
|
|
response_headers |
78
|
|
|
|
|
|
|
title |
79
|
|
|
|
|
|
|
source |
80
|
|
|
|
|
|
|
screenshot |
81
|
|
|
|
|
|
|
execute_script |
82
|
|
|
|
|
|
|
evaluate_script |
83
|
|
|
|
|
|
|
/) { |
84
|
|
|
|
|
|
|
Sub::Install::install_sub({ |
85
|
116
|
|
|
116
|
|
564378
|
code => sub { shift->driver->$method(@_) }, |
86
|
|
|
|
|
|
|
as => $method, |
87
|
|
|
|
|
|
|
}); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
*body = \&source; |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub visit { |
93
|
79
|
|
|
79
|
1
|
121250
|
my ($self, $url) = @_; |
94
|
|
|
|
|
|
|
|
95
|
79
|
50
|
33
|
|
|
379
|
if ($self->app_host && $url !~ /^http/) { |
96
|
79
|
|
|
|
|
290
|
$url = $self->app_host . $url; |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
79
|
|
|
|
|
537
|
$self->driver->visit($url); |
100
|
|
|
|
|
|
|
} |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
sub current_node { |
103
|
130
|
|
|
130
|
0
|
236
|
my $self = shift; |
104
|
130
|
50
|
|
|
|
188
|
if (@{$self->{scopes}}) { |
|
130
|
|
|
|
|
641
|
|
105
|
0
|
|
|
|
|
0
|
return $self->{scopes}->[-1]; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
else { |
108
|
130
|
|
|
|
|
433
|
return $self->document; |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
130
|
|
|
130
|
0
|
500
|
sub document { shift->driver->find('/html') } |
113
|
|
|
|
|
|
|
|
114
|
130
|
|
|
130
|
0
|
626
|
sub find { $_[0]->current_node->find($_[1]) } |
115
|
0
|
|
|
0
|
0
|
0
|
sub first { $_[0]->current_node->first($_[1]) } |
116
|
0
|
|
|
0
|
0
|
0
|
sub all { $_[0]->current_node->all($_[1]) } |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
sub _do_safe_action { |
119
|
130
|
|
|
130
|
|
312
|
my $code = shift; |
120
|
130
|
|
50
|
|
|
250
|
my $ret = eval { $code->(); 1 } || 0; |
121
|
130
|
50
|
|
|
|
519
|
Carp::carp($@) if $@; |
122
|
130
|
|
|
|
|
981
|
return $ret; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub click_link { |
126
|
4
|
|
|
4
|
1
|
2613
|
my ($self, $locator) = @_; |
127
|
4
|
|
|
|
|
25
|
my $xpath = Brownie::XPath::to_link($locator); |
128
|
4
|
|
|
4
|
|
52
|
_do_safe_action(sub { $self->find($xpath)->click }); |
|
4
|
|
|
|
|
16
|
|
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
sub click_button { |
132
|
58
|
|
|
58
|
1
|
6360
|
my ($self, $locator) = @_; |
133
|
58
|
|
|
|
|
762
|
my $xpath = Brownie::XPath::to_button($locator); |
134
|
58
|
|
|
58
|
|
497
|
_do_safe_action(sub { $self->find($xpath)->click }); |
|
58
|
|
|
|
|
223
|
|
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
sub click_link_or_button { |
138
|
11
|
|
|
11
|
0
|
9100
|
my ($self, $locator) = @_; |
139
|
11
|
|
|
|
|
75
|
my $xpath = Brownie::XPath::to_link_or_button($locator); |
140
|
11
|
|
|
11
|
|
119
|
_do_safe_action(sub { $self->find($xpath)->click }); |
|
11
|
|
|
|
|
47
|
|
141
|
|
|
|
|
|
|
} |
142
|
|
|
|
|
|
|
*click_on = \&click_link_or_button; |
143
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
sub fill_in { |
145
|
12
|
|
|
12
|
1
|
11792
|
my ($self, $locator, $value) = @_; |
146
|
12
|
|
|
|
|
99
|
my $xpath = Brownie::XPath::to_text_field($locator); |
147
|
12
|
|
|
12
|
|
150
|
_do_safe_action(sub { $self->find($xpath)->set($value) }); |
|
12
|
|
|
|
|
45
|
|
148
|
|
|
|
|
|
|
} |
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
sub choose { |
151
|
9
|
|
|
9
|
1
|
124905
|
my ($self, $locator) = @_; |
152
|
9
|
|
|
|
|
55
|
my $xpath = Brownie::XPath::to_radio($locator); |
153
|
9
|
|
|
9
|
|
111
|
_do_safe_action(sub { $self->find($xpath)->select }); |
|
9
|
|
|
|
|
36
|
|
154
|
|
|
|
|
|
|
} |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
sub check { |
157
|
6
|
|
|
6
|
1
|
119868
|
my ($self, $locator) = @_; |
158
|
6
|
|
|
|
|
55
|
my $xpath = Brownie::XPath::to_checkbox($locator); |
159
|
6
|
|
|
6
|
|
73
|
_do_safe_action(sub { $self->find($xpath)->select }); |
|
6
|
|
|
|
|
33
|
|
160
|
|
|
|
|
|
|
} |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
sub uncheck { |
163
|
6
|
|
|
6
|
1
|
60545
|
my ($self, $locator) = @_; |
164
|
6
|
|
|
|
|
41
|
my $xpath = Brownie::XPath::to_checkbox($locator); |
165
|
6
|
|
|
6
|
|
71
|
_do_safe_action(sub { $self->find($xpath)->unselect }); |
|
6
|
|
|
|
|
28
|
|
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
sub select { |
169
|
18
|
|
|
18
|
1
|
208517
|
my ($self, $locator) = @_; |
170
|
18
|
|
|
|
|
132
|
my $xpath = Brownie::XPath::to_option($locator); |
171
|
18
|
|
|
18
|
|
197
|
_do_safe_action(sub { $self->find($xpath)->select }); |
|
18
|
|
|
|
|
73
|
|
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub unselect { |
175
|
3
|
|
|
3
|
1
|
29
|
my ($self, $locator) = @_; |
176
|
3
|
|
|
|
|
18
|
my $xpath = Brownie::XPath::to_option($locator); |
177
|
3
|
|
|
3
|
|
39
|
_do_safe_action(sub { $self->find($xpath)->unselect }); |
|
3
|
|
|
|
|
13
|
|
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
sub attach_file { |
181
|
3
|
|
|
3
|
1
|
89315
|
my ($self, $locator, $filename) = @_; |
182
|
3
|
|
|
|
|
28
|
my $xpath = Brownie::XPath::to_file_field($locator); |
183
|
3
|
|
|
3
|
|
58
|
_do_safe_action(sub { $self->find($xpath)->set($filename) }); |
|
3
|
|
|
|
|
13
|
|
184
|
|
|
|
|
|
|
} |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
1; |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=head1 NAME |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
Brownie::Session - browser session class |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
=head1 SYNOPSIS |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
use Test::More; |
195
|
|
|
|
|
|
|
use Brownie::Session; |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
# external server |
198
|
|
|
|
|
|
|
my $session = Brownie::Session->new( |
199
|
|
|
|
|
|
|
driver => 'Mechanize', |
200
|
|
|
|
|
|
|
app_host => 'http://app.example.com:5000', |
201
|
|
|
|
|
|
|
); |
202
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
# PSGI app |
204
|
|
|
|
|
|
|
my $session = Brownie::Session->new( |
205
|
|
|
|
|
|
|
driver => 'Mechanize', |
206
|
|
|
|
|
|
|
app => sub { ...(PSGI app)... }, |
207
|
|
|
|
|
|
|
); |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
# PSGI file |
210
|
|
|
|
|
|
|
my $session = Brownie::Session->new( |
211
|
|
|
|
|
|
|
driver => 'Mechanize', |
212
|
|
|
|
|
|
|
app => 'app.psgi', |
213
|
|
|
|
|
|
|
); |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
$session->visit('/'); |
216
|
|
|
|
|
|
|
is $session->title => 'Some Title'; |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
$session->fill_in('User Name' => 'brownie'); |
219
|
|
|
|
|
|
|
$session->fill_in('Email Address' => 'brownie@example.com'); |
220
|
|
|
|
|
|
|
$session->click_button('Login'); |
221
|
|
|
|
|
|
|
like $session->source => qr/Welcome (.+)/; |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
$session->fill_in(q => 'Brownie'); |
224
|
|
|
|
|
|
|
$session->click_link_or_button('Search'); |
225
|
|
|
|
|
|
|
like $session->title => qr/Search result of Brownie/i; |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
done_testing; |
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
=head1 METHODS |
230
|
|
|
|
|
|
|
|
231
|
|
|
|
|
|
|
=over 4 |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
=item * C |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
my $session = Brownie::Session->new(%args); |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
C<%args> are: |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
=over 8 |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
=item * C: loadable driver name or config |
242
|
|
|
|
|
|
|
|
243
|
|
|
|
|
|
|
=item * C: external target application |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=item * C: PSGI application |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
=back |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
=back |
250
|
|
|
|
|
|
|
|
251
|
|
|
|
|
|
|
=head2 Driver Delegation |
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
=over 4 |
254
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=item * C |
256
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Go to $url. |
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
$session->visit('http://example.com/'); |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
=item * C |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
Returns current page's URL. |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
my $url = $session->current_url; |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
=item * C |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
Returns current page's path of URL. |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
my $path = $session->current_path; |
272
|
|
|
|
|
|
|
|
273
|
|
|
|
|
|
|
=item * C |
274
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
Returns current page's text. |
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
my $title = $session->title; |
278
|
|
|
|
|
|
|
|
279
|
|
|
|
|
|
|
=item * C |
280
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
Returns current page's HTML source. |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
my $source = $session->source; |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
=item * C |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
Takes current page's screenshot and saves to $filename as PNG. |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
$session->screenshot($filename); |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
=item * C |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
Executes snippet of JavaScript into current page. |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
$session->execute_script('$("body").empty()'); |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
=item * C |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
Executes snipptes and returns result. |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
my $result = $session->evaluate_script('1 + 2'); |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
If specified DOM element, it returns WebElement object. |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
my $node = $session->evaluate_script('document.getElementById("foo")'); |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
=back |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
=head2 Node Action |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
=over 4 |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
=item * C |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
Finds and clicks specified link. |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
$session->click_link($locator); |
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
C<$locator>: id or text of link |
320
|
|
|
|
|
|
|
|
321
|
|
|
|
|
|
|
=item * C |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
Finds and clicks specified buttons. |
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
$session->click_button($locator); |
326
|
|
|
|
|
|
|
|
327
|
|
|
|
|
|
|
C<$locator>: id or value of button |
328
|
|
|
|
|
|
|
|
329
|
|
|
|
|
|
|
=item * C |
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
Finds and clicks specified links or buttons. |
332
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
$session->click_on($locator); |
334
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
It combines C and C. |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
=item * C |
338
|
|
|
|
|
|
|
|
339
|
|
|
|
|
|
|
Sets a value to located field (input or textarea). |
340
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
$session->fill_in($locator, $value); |
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
=item * C |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
Selects a radio button. |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
$session->choose($locator); |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
=item * C |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
Sets a checkbox to "checked" |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
$session->check($locator); |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
=item * C |
356
|
|
|
|
|
|
|
|
357
|
|
|
|
|
|
|
Unsets a checkbox from "checked" |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
$session->check($locator); |
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
=item * C |
362
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
Selects an option. |
364
|
|
|
|
|
|
|
|
365
|
|
|
|
|
|
|
$session->select($locator); |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
=item * C |
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
Unselects an option in multiple select. |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
$session->unselect($locator); |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
=item * C |
374
|
|
|
|
|
|
|
|
375
|
|
|
|
|
|
|
Sets a path to file upload field. |
376
|
|
|
|
|
|
|
|
377
|
|
|
|
|
|
|
$session->attach_file($locator, $filename); |
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=back |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
=head1 AUTHOR |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
NAKAGAWA Masaki Emasaki@cpan.orgE |
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
=head1 LICENSE |
386
|
|
|
|
|
|
|
|
387
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
388
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
=head1 SEE ALSO |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
L, L |
393
|
|
|
|
|
|
|
|
394
|
|
|
|
|
|
|
=cut |