line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# Copyright 2006 ThoughtWorks, Inc |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); |
4
|
|
|
|
|
|
|
# you may not use this file except in compliance with the License. |
5
|
|
|
|
|
|
|
# You may obtain a copy of the License at |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0 |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software |
10
|
|
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, |
11
|
|
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12
|
|
|
|
|
|
|
# See the License for the specific language governing permissions and |
13
|
|
|
|
|
|
|
# limitations under the License. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
package WWW::Selenium; |
17
|
|
|
|
|
|
|
{ |
18
|
|
|
|
|
|
|
$WWW::Selenium::VERSION = '1.36'; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
# ABSTRACT: Perl Client for the Selenium Remote Control test tool |
21
|
|
|
|
|
|
|
|
22
|
10
|
|
|
10
|
|
463735
|
use LWP::UserAgent; |
|
10
|
|
|
|
|
319353
|
|
|
10
|
|
|
|
|
421
|
|
23
|
10
|
|
|
10
|
|
93
|
use HTTP::Request; |
|
10
|
|
|
|
|
20
|
|
|
10
|
|
|
|
|
317
|
|
24
|
10
|
|
|
10
|
|
7666
|
use HTTP::Headers; |
|
10
|
|
|
|
|
110458
|
|
|
10
|
|
|
|
|
2150
|
|
25
|
10
|
|
|
10
|
|
9231
|
use URI::Escape; |
|
10
|
|
|
|
|
27500
|
|
|
10
|
|
|
|
|
1206
|
|
26
|
10
|
|
|
10
|
|
84
|
use Carp qw(croak); |
|
10
|
|
|
|
|
21
|
|
|
10
|
|
|
|
|
970
|
|
27
|
10
|
|
|
10
|
|
14273
|
use Time::HiRes qw(sleep); |
|
10
|
|
|
|
|
49383
|
|
|
10
|
|
|
|
|
77
|
|
28
|
|
|
|
|
|
|
|
29
|
10
|
|
|
10
|
|
2402
|
use strict; |
|
10
|
|
|
|
|
25
|
|
|
10
|
|
|
|
|
339
|
|
30
|
10
|
|
|
10
|
|
115
|
use warnings; |
|
10
|
|
|
|
|
22
|
|
|
10
|
|
|
|
|
90708
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
### This next part is auto-generated based on the big comment in selenium-api.js |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
#Defines an object that runs Selenium commands. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
eval 'require Encode'; |
39
|
|
|
|
|
|
|
my $encode_present = !$@; |
40
|
|
|
|
|
|
|
Encode->import('decode_utf8') if $encode_present; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
sub new { |
44
|
32
|
|
|
32
|
1
|
5053
|
my ($class, %args) = @_; |
45
|
32
|
|
100
|
|
|
514
|
my $self = { # default args: |
46
|
|
|
|
|
|
|
host => 'localhost', |
47
|
|
|
|
|
|
|
port => 4444, |
48
|
|
|
|
|
|
|
auto_stop => 1, |
49
|
|
|
|
|
|
|
browser_start_command => delete $args{browser} || '*firefox', |
50
|
|
|
|
|
|
|
_ua => undef, |
51
|
|
|
|
|
|
|
keep_alive => 5, |
52
|
|
|
|
|
|
|
http_method => 'POST', |
53
|
|
|
|
|
|
|
%args, |
54
|
|
|
|
|
|
|
}; |
55
|
32
|
100
|
|
|
|
357
|
croak 'browser_url is mandatory!' unless $self->{browser_url}; |
56
|
31
|
50
|
|
|
|
193
|
croak "Unknown http_method: ($self->{http_method})" |
57
|
|
|
|
|
|
|
unless $self->{http_method} =~ m/^GET|POST$/; |
58
|
31
|
50
|
|
|
|
199
|
bless $self, $class or die "Can't bless $class: $!"; |
59
|
31
|
|
|
|
|
121
|
return $self; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub start { |
63
|
32
|
|
|
32
|
0
|
6705
|
my $self = shift; |
64
|
32
|
100
|
|
|
|
115
|
return if $self->{session_id}; |
65
|
29
|
|
|
|
|
165
|
$self->{session_id} = $self->get_string("getNewBrowserSession", |
66
|
|
|
|
|
|
|
$self->{browser_start_command}, |
67
|
|
|
|
|
|
|
$self->{browser_url}); |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub stop { |
71
|
35
|
|
|
35
|
0
|
11455
|
my $self = shift; |
72
|
35
|
100
|
|
|
|
173
|
return unless defined $self->{session_id}; |
73
|
28
|
|
|
|
|
106
|
$self->do_command("testComplete"); |
74
|
28
|
|
|
|
|
740
|
$self->{session_id} = undef; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
sub do_command { |
78
|
303
|
|
|
303
|
0
|
3353
|
my ($self, $command, @args) = @_; |
79
|
303
|
|
|
|
|
697
|
my $get = $self->{http_method} eq 'GET'; |
80
|
|
|
|
|
|
|
|
81
|
303
|
100
|
|
|
|
713
|
$self->{_page_opened} = 1 if $command eq 'open'; |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
# Check that user has called open() |
84
|
303
|
|
|
|
|
3442
|
my %valid_pre_open_commands = ( |
85
|
|
|
|
|
|
|
testComplete => 1, |
86
|
|
|
|
|
|
|
getNewBrowserSession => 1, |
87
|
|
|
|
|
|
|
setTimeout => 1, |
88
|
|
|
|
|
|
|
); |
89
|
303
|
100
|
66
|
|
|
1176
|
if (!$self->{_page_opened} and !$valid_pre_open_commands{$command}) { |
90
|
1
|
|
|
|
|
12
|
die "You must open a page before calling $command. eg: \$sel->open('/');\n"; |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
302
|
|
|
|
|
999
|
my $fullurl = "http://$self->{host}:$self->{port}/selenium-server/driver/"; |
94
|
302
|
50
|
|
|
|
1598
|
$fullurl .= '?' if $get; |
95
|
302
|
|
|
|
|
2141
|
my $content = ''; |
96
|
|
|
|
|
|
|
|
97
|
302
|
|
|
|
|
1971
|
my $i = 1; |
98
|
302
|
|
|
|
|
979
|
@args = grep defined, @args; |
99
|
302
|
50
|
|
|
|
737
|
my $params = $get ? \$fullurl : \$content; |
100
|
302
|
|
|
|
|
1138
|
$$params .= "cmd=" . uri_escape($command); |
101
|
302
|
|
|
|
|
5826
|
while (@args) { |
102
|
428
|
|
|
|
|
4009
|
$$params .= '&' . $i++ . '=' . URI::Escape::uri_escape_utf8(shift @args); |
103
|
|
|
|
|
|
|
} |
104
|
302
|
100
|
|
|
|
6544
|
if (defined $self->{session_id}) { |
105
|
273
|
|
|
|
|
1125
|
$$params .= "&sessionId=$self->{session_id}"; |
106
|
|
|
|
|
|
|
} |
107
|
|
|
|
|
|
|
# We use the full version of LWP to make sure we issue an |
108
|
|
|
|
|
|
|
# HTTP 1.1 request (SRC-25) |
109
|
|
|
|
|
|
|
|
110
|
302
|
50
|
|
|
|
780
|
my $method = $get ? 'GET' : 'POST'; |
111
|
302
|
50
|
|
|
|
929
|
print "---> Requesting $method $fullurl ($content)\n" if $self->{verbose}; |
112
|
302
|
50
|
|
|
|
2245
|
my $header = HTTP::Headers->new( |
113
|
|
|
|
|
|
|
$get ? () : ( |
114
|
|
|
|
|
|
|
Content_Type => 'application/x-www-form-urlencoded; charset=utf-8' |
115
|
|
|
|
|
|
|
) |
116
|
|
|
|
|
|
|
); |
117
|
302
|
|
|
|
|
21643
|
my $response = $self->ua->request( |
118
|
|
|
|
|
|
|
HTTP::Request->new($method => $fullurl, $header, $content) ); |
119
|
302
|
|
|
|
|
37203
|
my $result; |
120
|
302
|
50
|
|
|
|
1940
|
if ($response->is_success) { |
121
|
302
|
|
|
|
|
37332
|
$result = $response->content; |
122
|
302
|
50
|
|
|
|
19406
|
print "Got result: $result\n" if $self->{verbose}; |
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
else { |
125
|
0
|
|
|
|
|
0
|
die "Error requesting $fullurl:\n" . $response->status_line . "\n"; |
126
|
|
|
|
|
|
|
} |
127
|
302
|
50
|
|
|
|
1397
|
$result = decode_utf8($result) if $encode_present; |
128
|
302
|
100
|
|
|
|
9532
|
die "Error requesting $fullurl:\n$result\n" unless $result =~ /^OK/; |
129
|
297
|
|
|
|
|
1676
|
return $result; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub ua { |
133
|
313
|
|
|
313
|
0
|
646
|
my $self = shift; |
134
|
|
|
|
|
|
|
|
135
|
313
|
|
66
|
|
|
1404
|
$self->{_ua} ||= LWP::UserAgent->new(keep_alive => $self->{keep_alive}); |
136
|
|
|
|
|
|
|
|
137
|
313
|
100
|
|
|
|
1167
|
if (my $msec = $self->{_timeout}) { |
138
|
|
|
|
|
|
|
# Keep the 3 minute timeout (LWP::UserAgent default) on top of the |
139
|
|
|
|
|
|
|
# selenium timeout |
140
|
37
|
|
|
|
|
279
|
$self->{_ua}->timeout( int($msec/1000 + 180) ); |
141
|
|
|
|
|
|
|
} |
142
|
313
|
|
|
|
|
16659
|
return $self->{_ua}; |
143
|
|
|
|
|
|
|
} |
144
|
|
|
|
|
|
|
|
145
|
|
|
|
|
|
|
sub get_string { |
146
|
156
|
|
|
156
|
0
|
247
|
my $self = shift; |
147
|
156
|
|
|
|
|
592
|
my $result = $self->do_command(@_); |
148
|
151
|
|
|
|
|
2405
|
return substr($result, 3); |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
sub get_string_array { |
152
|
30
|
|
|
30
|
0
|
42
|
my $self = shift; |
153
|
30
|
|
|
|
|
88
|
my $result = $self->get_string(@_); |
154
|
29
|
|
|
|
|
43
|
my $token = ""; |
155
|
29
|
|
|
|
|
49
|
my @tokens = (); |
156
|
29
|
|
|
|
|
182
|
my @chars = split(//, $result); |
157
|
29
|
|
|
|
|
98
|
for (my $i = 0; $i < @chars; $i++) { |
158
|
306
|
|
|
|
|
380
|
my $char = $chars[$i]; |
159
|
306
|
100
|
|
|
|
603
|
if ($char eq '\\') { |
|
|
100
|
|
|
|
|
|
160
|
12
|
|
|
|
|
13
|
$i++; |
161
|
12
|
|
|
|
|
12
|
$char = $chars[$i]; |
162
|
12
|
|
|
|
|
26
|
$token .= $char; |
163
|
|
|
|
|
|
|
} elsif ($char eq ',') { |
164
|
16
|
|
|
|
|
23
|
push (@tokens, $token); |
165
|
16
|
|
|
|
|
46
|
$token = ""; |
166
|
|
|
|
|
|
|
} else { |
167
|
278
|
|
|
|
|
598
|
$token .= $char; |
168
|
|
|
|
|
|
|
} |
169
|
|
|
|
|
|
|
} |
170
|
29
|
|
|
|
|
52
|
push (@tokens, $token); |
171
|
29
|
|
|
|
|
166
|
return @tokens; |
172
|
|
|
|
|
|
|
} |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
sub get_number { |
175
|
8
|
|
|
8
|
0
|
15
|
my $self = shift; |
176
|
8
|
|
|
|
|
37
|
my $result = $self->get_string(@_); |
177
|
|
|
|
|
|
|
# Is there something else I need to do here? |
178
|
8
|
|
|
|
|
40
|
return $result; |
179
|
|
|
|
|
|
|
} |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
sub get_number_array { |
182
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
183
|
0
|
|
|
|
|
0
|
my @result = $self->get_string_array(@_); |
184
|
|
|
|
|
|
|
# Is there something else I need to do here? |
185
|
0
|
|
|
|
|
0
|
return @result; |
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
sub get_boolean { |
189
|
13
|
|
|
13
|
0
|
22
|
my $self = shift; |
190
|
13
|
|
|
|
|
56
|
my $result = $self->get_string(@_); |
191
|
13
|
50
|
|
|
|
35
|
if ($result eq "true") { |
192
|
13
|
|
|
|
|
64
|
return 1; |
193
|
|
|
|
|
|
|
} |
194
|
0
|
0
|
|
|
|
0
|
if ($result eq "false") { |
195
|
0
|
|
|
|
|
0
|
return 0; |
196
|
|
|
|
|
|
|
} |
197
|
0
|
|
|
|
|
0
|
die "result is neither 'true' nor 'false': $result"; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
sub get_boolean_array { |
201
|
0
|
|
|
0
|
0
|
0
|
my $self = shift; |
202
|
0
|
|
|
|
|
0
|
my @result = $self->get_string_array(@_); |
203
|
0
|
|
|
|
|
0
|
my @boolarr = (); |
204
|
0
|
|
|
|
|
0
|
for (my $i = 0; $i < @result; $i++) { |
205
|
0
|
0
|
|
|
|
0
|
if ($result[$i] eq "true") { |
206
|
0
|
|
|
|
|
0
|
push (@boolarr, 1); |
207
|
0
|
|
|
|
|
0
|
next; |
208
|
|
|
|
|
|
|
} |
209
|
0
|
0
|
|
|
|
0
|
if ($result[$i] eq "false") { |
210
|
0
|
|
|
|
|
0
|
push (@boolarr, 0); |
211
|
0
|
|
|
|
|
0
|
next; |
212
|
|
|
|
|
|
|
} |
213
|
0
|
|
|
|
|
0
|
die "result is neither 'true' nor 'false': ". $result[$i]; |
214
|
|
|
|
|
|
|
} |
215
|
0
|
|
|
|
|
0
|
return @boolarr; |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
sub pause { |
220
|
0
|
|
|
0
|
1
|
0
|
my ($self,$timeout) = @_; |
221
|
0
|
0
|
|
|
|
0
|
$timeout = 1000 unless defined $timeout; |
222
|
0
|
|
|
|
|
0
|
$timeout /= 1000; |
223
|
0
|
|
|
|
|
0
|
sleep $timeout; |
224
|
|
|
|
|
|
|
} |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
### From here on, everything's auto-generated from XML |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
|
229
|
|
|
|
|
|
|
sub click { |
230
|
6
|
|
|
6
|
1
|
114
|
my $self = shift; |
231
|
6
|
|
|
|
|
21
|
$self->do_command("click", @_); |
232
|
|
|
|
|
|
|
} |
233
|
|
|
|
|
|
|
|
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
sub double_click { |
236
|
1
|
|
|
1
|
1
|
597
|
my $self = shift; |
237
|
1
|
|
|
|
|
6
|
$self->do_command("doubleClick", @_); |
238
|
|
|
|
|
|
|
} |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
sub context_menu { |
242
|
1
|
|
|
1
|
1
|
491
|
my $self = shift; |
243
|
1
|
|
|
|
|
6
|
$self->do_command("contextMenu", @_); |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub click_at { |
248
|
1
|
|
|
1
|
1
|
542
|
my $self = shift; |
249
|
1
|
|
|
|
|
6
|
$self->do_command("clickAt", @_); |
250
|
|
|
|
|
|
|
} |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
|
253
|
|
|
|
|
|
|
sub double_click_at { |
254
|
1
|
|
|
1
|
1
|
523
|
my $self = shift; |
255
|
1
|
|
|
|
|
6
|
$self->do_command("doubleClickAt", @_); |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
|
258
|
|
|
|
|
|
|
|
259
|
|
|
|
|
|
|
sub context_menu_at { |
260
|
1
|
|
|
1
|
1
|
510
|
my $self = shift; |
261
|
1
|
|
|
|
|
5
|
$self->do_command("contextMenuAt", @_); |
262
|
|
|
|
|
|
|
} |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
sub fire_event { |
266
|
1
|
|
|
1
|
1
|
518
|
my $self = shift; |
267
|
1
|
|
|
|
|
6
|
$self->do_command("fireEvent", @_); |
268
|
|
|
|
|
|
|
} |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
sub focus { |
272
|
1
|
|
|
1
|
1
|
679
|
my $self = shift; |
273
|
1
|
|
|
|
|
6
|
$self->do_command("focus", @_); |
274
|
|
|
|
|
|
|
} |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
sub key_press { |
278
|
1
|
|
|
1
|
1
|
521
|
my $self = shift; |
279
|
1
|
|
|
|
|
14
|
$self->do_command("keyPress", @_); |
280
|
|
|
|
|
|
|
} |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
sub shift_key_down { |
284
|
1
|
|
|
1
|
1
|
467
|
my $self = shift; |
285
|
1
|
|
|
|
|
5
|
$self->do_command("shiftKeyDown", @_); |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
sub shift_key_up { |
290
|
1
|
|
|
1
|
1
|
491
|
my $self = shift; |
291
|
1
|
|
|
|
|
5
|
$self->do_command("shiftKeyUp", @_); |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
sub meta_key_down { |
296
|
1
|
|
|
1
|
1
|
506
|
my $self = shift; |
297
|
1
|
|
|
|
|
5
|
$self->do_command("metaKeyDown", @_); |
298
|
|
|
|
|
|
|
} |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
sub meta_key_up { |
302
|
1
|
|
|
1
|
1
|
554
|
my $self = shift; |
303
|
1
|
|
|
|
|
6
|
$self->do_command("metaKeyUp", @_); |
304
|
|
|
|
|
|
|
} |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
sub alt_key_down { |
308
|
1
|
|
|
1
|
1
|
584
|
my $self = shift; |
309
|
1
|
|
|
|
|
7
|
$self->do_command("altKeyDown", @_); |
310
|
|
|
|
|
|
|
} |
311
|
|
|
|
|
|
|
|
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
sub alt_key_up { |
314
|
1
|
|
|
1
|
1
|
550
|
my $self = shift; |
315
|
1
|
|
|
|
|
5
|
$self->do_command("altKeyUp", @_); |
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
|
319
|
|
|
|
|
|
|
sub control_key_down { |
320
|
1
|
|
|
1
|
1
|
542
|
my $self = shift; |
321
|
1
|
|
|
|
|
7
|
$self->do_command("controlKeyDown", @_); |
322
|
|
|
|
|
|
|
} |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
sub control_key_up { |
326
|
1
|
|
|
1
|
1
|
568
|
my $self = shift; |
327
|
1
|
|
|
|
|
6
|
$self->do_command("controlKeyUp", @_); |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
|
331
|
|
|
|
|
|
|
sub key_down { |
332
|
1
|
|
|
1
|
1
|
496
|
my $self = shift; |
333
|
1
|
|
|
|
|
5
|
$self->do_command("keyDown", @_); |
334
|
|
|
|
|
|
|
} |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
sub key_up { |
338
|
1
|
|
|
1
|
1
|
486
|
my $self = shift; |
339
|
1
|
|
|
|
|
5
|
$self->do_command("keyUp", @_); |
340
|
|
|
|
|
|
|
} |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
|
343
|
|
|
|
|
|
|
sub mouse_over { |
344
|
1
|
|
|
1
|
1
|
547
|
my $self = shift; |
345
|
1
|
|
|
|
|
6
|
$self->do_command("mouseOver", @_); |
346
|
|
|
|
|
|
|
} |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
sub mouse_out { |
350
|
1
|
|
|
1
|
1
|
615
|
my $self = shift; |
351
|
1
|
|
|
|
|
6
|
$self->do_command("mouseOut", @_); |
352
|
|
|
|
|
|
|
} |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
sub mouse_down { |
356
|
1
|
|
|
1
|
1
|
595
|
my $self = shift; |
357
|
1
|
|
|
|
|
6
|
$self->do_command("mouseDown", @_); |
358
|
|
|
|
|
|
|
} |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
sub mouse_down_right { |
362
|
1
|
|
|
1
|
1
|
525
|
my $self = shift; |
363
|
1
|
|
|
|
|
6
|
$self->do_command("mouseDownRight", @_); |
364
|
|
|
|
|
|
|
} |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
sub mouse_down_at { |
368
|
1
|
|
|
1
|
1
|
497
|
my $self = shift; |
369
|
1
|
|
|
|
|
5
|
$self->do_command("mouseDownAt", @_); |
370
|
|
|
|
|
|
|
} |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
sub mouse_down_right_at { |
374
|
1
|
|
|
1
|
1
|
502
|
my $self = shift; |
375
|
1
|
|
|
|
|
5
|
$self->do_command("mouseDownRightAt", @_); |
376
|
|
|
|
|
|
|
} |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
sub mouse_up { |
380
|
1
|
|
|
1
|
1
|
535
|
my $self = shift; |
381
|
1
|
|
|
|
|
5
|
$self->do_command("mouseUp", @_); |
382
|
|
|
|
|
|
|
} |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
|
385
|
|
|
|
|
|
|
sub mouse_up_right { |
386
|
1
|
|
|
1
|
1
|
566
|
my $self = shift; |
387
|
1
|
|
|
|
|
6
|
$self->do_command("mouseUpRight", @_); |
388
|
|
|
|
|
|
|
} |
389
|
|
|
|
|
|
|
|
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
sub mouse_up_at { |
392
|
1
|
|
|
1
|
1
|
565
|
my $self = shift; |
393
|
1
|
|
|
|
|
11
|
$self->do_command("mouseUpAt", @_); |
394
|
|
|
|
|
|
|
} |
395
|
|
|
|
|
|
|
|
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
sub mouse_up_right_at { |
398
|
1
|
|
|
1
|
1
|
706
|
my $self = shift; |
399
|
1
|
|
|
|
|
6
|
$self->do_command("mouseUpRightAt", @_); |
400
|
|
|
|
|
|
|
} |
401
|
|
|
|
|
|
|
|
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
sub mouse_move { |
404
|
1
|
|
|
1
|
1
|
516
|
my $self = shift; |
405
|
1
|
|
|
|
|
6
|
$self->do_command("mouseMove", @_); |
406
|
|
|
|
|
|
|
} |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
sub mouse_move_at { |
410
|
1
|
|
|
1
|
1
|
517
|
my $self = shift; |
411
|
1
|
|
|
|
|
7
|
$self->do_command("mouseMoveAt", @_); |
412
|
|
|
|
|
|
|
} |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
sub type { |
416
|
1
|
|
|
1
|
1
|
522
|
my $self = shift; |
417
|
1
|
|
|
|
|
6
|
$self->do_command("type", @_); |
418
|
|
|
|
|
|
|
} |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
sub type_keys { |
422
|
1
|
|
|
1
|
1
|
545
|
my $self = shift; |
423
|
1
|
|
|
|
|
7
|
$self->do_command("typeKeys", @_); |
424
|
|
|
|
|
|
|
} |
425
|
|
|
|
|
|
|
|
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
sub set_speed { |
428
|
1
|
|
|
1
|
1
|
567
|
my $self = shift; |
429
|
1
|
|
|
|
|
64
|
$self->do_command("setSpeed", @_); |
430
|
|
|
|
|
|
|
} |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
sub get_speed { |
434
|
1
|
|
|
1
|
1
|
585
|
my $self = shift; |
435
|
1
|
|
|
|
|
8
|
return $self->get_string("getSpeed", @_); |
436
|
|
|
|
|
|
|
} |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
sub check { |
440
|
1
|
|
|
1
|
1
|
512
|
my $self = shift; |
441
|
1
|
|
|
|
|
6
|
$self->do_command("check", @_); |
442
|
|
|
|
|
|
|
} |
443
|
|
|
|
|
|
|
|
444
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
sub uncheck { |
446
|
1
|
|
|
1
|
1
|
500
|
my $self = shift; |
447
|
1
|
|
|
|
|
5
|
$self->do_command("uncheck", @_); |
448
|
|
|
|
|
|
|
} |
449
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
sub select { |
452
|
1
|
|
|
1
|
1
|
484
|
my $self = shift; |
453
|
1
|
|
|
|
|
7
|
$self->do_command("select", @_); |
454
|
|
|
|
|
|
|
} |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
sub add_selection { |
458
|
1
|
|
|
1
|
1
|
521
|
my $self = shift; |
459
|
1
|
|
|
|
|
5
|
$self->do_command("addSelection", @_); |
460
|
|
|
|
|
|
|
} |
461
|
|
|
|
|
|
|
|
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
sub remove_selection { |
464
|
1
|
|
|
1
|
1
|
560
|
my $self = shift; |
465
|
1
|
|
|
|
|
18
|
$self->do_command("removeSelection", @_); |
466
|
|
|
|
|
|
|
} |
467
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
sub remove_all_selections { |
470
|
1
|
|
|
1
|
1
|
550
|
my $self = shift; |
471
|
1
|
|
|
|
|
6
|
$self->do_command("removeAllSelections", @_); |
472
|
|
|
|
|
|
|
} |
473
|
|
|
|
|
|
|
|
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
sub submit { |
476
|
1
|
|
|
1
|
1
|
553
|
my $self = shift; |
477
|
1
|
|
|
|
|
6
|
$self->do_command("submit", @_); |
478
|
|
|
|
|
|
|
} |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
sub open { |
482
|
23
|
|
|
23
|
1
|
29212
|
my $self = shift; |
483
|
23
|
|
100
|
|
|
158
|
$_[0] ||= '/'; # default to opening site root |
484
|
|
|
|
|
|
|
|
485
|
23
|
|
|
|
|
91
|
$self->do_command("open", @_); |
486
|
|
|
|
|
|
|
} |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
sub open_window { |
490
|
1
|
|
|
1
|
1
|
493
|
my $self = shift; |
491
|
1
|
|
|
|
|
6
|
$self->do_command("openWindow", @_); |
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
sub select_window { |
496
|
1
|
|
|
1
|
1
|
494
|
my $self = shift; |
497
|
1
|
|
|
|
|
6
|
$self->do_command("selectWindow", @_); |
498
|
|
|
|
|
|
|
} |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
sub select_pop_up { |
502
|
1
|
|
|
1
|
1
|
486
|
my $self = shift; |
503
|
1
|
|
|
|
|
6
|
$self->do_command("selectPopUp", @_); |
504
|
|
|
|
|
|
|
} |
505
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
sub deselect_pop_up { |
508
|
1
|
|
|
1
|
1
|
554
|
my $self = shift; |
509
|
1
|
|
|
|
|
6
|
$self->do_command("deselectPopUp", @_); |
510
|
|
|
|
|
|
|
} |
511
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
sub select_frame { |
514
|
1
|
|
|
1
|
1
|
613
|
my $self = shift; |
515
|
1
|
|
|
|
|
6
|
$self->do_command("selectFrame", @_); |
516
|
|
|
|
|
|
|
} |
517
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
sub get_whether_this_frame_match_frame_expression { |
520
|
1
|
|
|
1
|
1
|
550
|
my $self = shift; |
521
|
1
|
|
|
|
|
8
|
return $self->get_boolean("getWhetherThisFrameMatchFrameExpression", @_); |
522
|
|
|
|
|
|
|
} |
523
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
sub get_whether_this_window_match_window_expression { |
526
|
1
|
|
|
1
|
1
|
494
|
my $self = shift; |
527
|
1
|
|
|
|
|
6
|
return $self->get_boolean("getWhetherThisWindowMatchWindowExpression", @_); |
528
|
|
|
|
|
|
|
} |
529
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
sub wait_for_pop_up { |
532
|
1
|
|
|
1
|
1
|
502
|
my $self = shift; |
533
|
1
|
|
|
|
|
4
|
local $self->{_timeout} = $_[1]; |
534
|
|
|
|
|
|
|
|
535
|
1
|
|
|
|
|
6
|
$self->do_command("waitForPopUp", @_); |
536
|
|
|
|
|
|
|
} |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
|
539
|
|
|
|
|
|
|
sub choose_cancel_on_next_confirmation { |
540
|
1
|
|
|
1
|
1
|
533
|
my $self = shift; |
541
|
1
|
|
|
|
|
5
|
$self->do_command("chooseCancelOnNextConfirmation", @_); |
542
|
|
|
|
|
|
|
} |
543
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
|
545
|
|
|
|
|
|
|
sub choose_ok_on_next_confirmation { |
546
|
1
|
|
|
1
|
1
|
586
|
my $self = shift; |
547
|
1
|
|
|
|
|
8
|
$self->do_command("chooseOkOnNextConfirmation", @_); |
548
|
|
|
|
|
|
|
} |
549
|
|
|
|
|
|
|
|
550
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
sub answer_on_next_prompt { |
552
|
1
|
|
|
1
|
1
|
560
|
my $self = shift; |
553
|
1
|
|
|
|
|
6
|
$self->do_command("answerOnNextPrompt", @_); |
554
|
|
|
|
|
|
|
} |
555
|
|
|
|
|
|
|
|
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
sub go_back { |
558
|
1
|
|
|
1
|
1
|
562
|
my $self = shift; |
559
|
1
|
|
|
|
|
6
|
$self->do_command("goBack", @_); |
560
|
|
|
|
|
|
|
} |
561
|
|
|
|
|
|
|
|
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
sub refresh { |
564
|
1
|
|
|
1
|
1
|
525
|
my $self = shift; |
565
|
1
|
|
|
|
|
5
|
$self->do_command("refresh", @_); |
566
|
|
|
|
|
|
|
} |
567
|
|
|
|
|
|
|
|
568
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
sub close { |
570
|
1
|
|
|
1
|
1
|
493
|
my $self = shift; |
571
|
1
|
|
|
|
|
6
|
$self->do_command("close", @_); |
572
|
|
|
|
|
|
|
} |
573
|
|
|
|
|
|
|
|
574
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
sub is_alert_present { |
576
|
1
|
|
|
1
|
1
|
500
|
my $self = shift; |
577
|
1
|
|
|
|
|
7
|
return $self->get_boolean("isAlertPresent", @_); |
578
|
|
|
|
|
|
|
} |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
|
581
|
|
|
|
|
|
|
sub is_prompt_present { |
582
|
1
|
|
|
1
|
1
|
489
|
my $self = shift; |
583
|
1
|
|
|
|
|
5
|
return $self->get_boolean("isPromptPresent", @_); |
584
|
|
|
|
|
|
|
} |
585
|
|
|
|
|
|
|
|
586
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
sub is_confirmation_present { |
588
|
1
|
|
|
1
|
1
|
507
|
my $self = shift; |
589
|
1
|
|
|
|
|
5
|
return $self->get_boolean("isConfirmationPresent", @_); |
590
|
|
|
|
|
|
|
} |
591
|
|
|
|
|
|
|
|
592
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
sub get_alert { |
594
|
3
|
|
|
3
|
1
|
709
|
my $self = shift; |
595
|
3
|
|
|
|
|
16
|
return $self->get_string("getAlert", @_); |
596
|
|
|
|
|
|
|
} |
597
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
sub get_confirmation { |
600
|
1
|
|
|
1
|
1
|
570
|
my $self = shift; |
601
|
1
|
|
|
|
|
6
|
return $self->get_string("getConfirmation", @_); |
602
|
|
|
|
|
|
|
} |
603
|
|
|
|
|
|
|
|
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
sub get_prompt { |
606
|
3
|
|
|
3
|
1
|
488
|
my $self = shift; |
607
|
3
|
|
|
|
|
11
|
return $self->get_string("getPrompt", @_); |
608
|
|
|
|
|
|
|
} |
609
|
|
|
|
|
|
|
|
610
|
|
|
|
|
|
|
|
611
|
|
|
|
|
|
|
sub get_location { |
612
|
11
|
|
|
11
|
1
|
4025
|
my $self = shift; |
613
|
11
|
|
|
|
|
104
|
return $self->get_string("getLocation", @_); |
614
|
|
|
|
|
|
|
} |
615
|
|
|
|
|
|
|
|
616
|
|
|
|
|
|
|
|
617
|
|
|
|
|
|
|
sub get_title { |
618
|
7
|
|
|
7
|
1
|
3058
|
my $self = shift; |
619
|
7
|
|
|
|
|
31
|
return $self->get_string("getTitle", @_); |
620
|
|
|
|
|
|
|
} |
621
|
|
|
|
|
|
|
|
622
|
|
|
|
|
|
|
|
623
|
|
|
|
|
|
|
sub get_body_text { |
624
|
1
|
|
|
1
|
1
|
519
|
my $self = shift; |
625
|
1
|
|
|
|
|
6
|
return $self->get_string("getBodyText", @_); |
626
|
|
|
|
|
|
|
} |
627
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
|
629
|
|
|
|
|
|
|
sub get_value { |
630
|
1
|
|
|
1
|
1
|
484
|
my $self = shift; |
631
|
1
|
|
|
|
|
6
|
return $self->get_string("getValue", @_); |
632
|
|
|
|
|
|
|
} |
633
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
|
635
|
|
|
|
|
|
|
sub get_text { |
636
|
25
|
|
|
25
|
1
|
589
|
my $self = shift; |
637
|
25
|
|
|
|
|
99
|
return $self->get_string("getText", @_); |
638
|
|
|
|
|
|
|
} |
639
|
|
|
|
|
|
|
|
640
|
|
|
|
|
|
|
|
641
|
|
|
|
|
|
|
sub highlight { |
642
|
1
|
|
|
1
|
1
|
545
|
my $self = shift; |
643
|
1
|
|
|
|
|
5
|
$self->do_command("highlight", @_); |
644
|
|
|
|
|
|
|
} |
645
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
sub get_eval { |
648
|
1
|
|
|
1
|
1
|
588
|
my $self = shift; |
649
|
1
|
|
|
|
|
18
|
return $self->get_string("getEval", @_); |
650
|
|
|
|
|
|
|
} |
651
|
|
|
|
|
|
|
|
652
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
sub is_checked { |
654
|
1
|
|
|
1
|
1
|
480
|
my $self = shift; |
655
|
1
|
|
|
|
|
7
|
return $self->get_boolean("isChecked", @_); |
656
|
|
|
|
|
|
|
} |
657
|
|
|
|
|
|
|
|
658
|
|
|
|
|
|
|
|
659
|
|
|
|
|
|
|
sub get_table { |
660
|
1
|
|
|
1
|
1
|
484
|
my $self = shift; |
661
|
1
|
|
|
|
|
5
|
return $self->get_string("getTable", @_); |
662
|
|
|
|
|
|
|
} |
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
|
665
|
|
|
|
|
|
|
sub get_selected_labels { |
666
|
5
|
|
|
5
|
1
|
511
|
my $self = shift; |
667
|
5
|
|
|
|
|
24
|
return $self->get_string_array("getSelectedLabels", @_); |
668
|
|
|
|
|
|
|
} |
669
|
|
|
|
|
|
|
|
670
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
sub get_selected_label { |
672
|
1
|
|
|
1
|
1
|
614
|
my $self = shift; |
673
|
1
|
|
|
|
|
7
|
return $self->get_string("getSelectedLabel", @_); |
674
|
|
|
|
|
|
|
} |
675
|
|
|
|
|
|
|
|
676
|
|
|
|
|
|
|
|
677
|
|
|
|
|
|
|
sub get_selected_values { |
678
|
3
|
|
|
3
|
1
|
551
|
my $self = shift; |
679
|
3
|
|
|
|
|
14
|
return $self->get_string_array("getSelectedValues", @_); |
680
|
|
|
|
|
|
|
} |
681
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
sub get_selected_value { |
684
|
1
|
|
|
1
|
1
|
556
|
my $self = shift; |
685
|
1
|
|
|
|
|
21
|
return $self->get_string("getSelectedValue", @_); |
686
|
|
|
|
|
|
|
} |
687
|
|
|
|
|
|
|
|
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
sub get_selected_indexes { |
690
|
3
|
|
|
3
|
1
|
510
|
my $self = shift; |
691
|
3
|
|
|
|
|
12
|
return $self->get_string_array("getSelectedIndexes", @_); |
692
|
|
|
|
|
|
|
} |
693
|
|
|
|
|
|
|
|
694
|
|
|
|
|
|
|
|
695
|
|
|
|
|
|
|
sub get_selected_index { |
696
|
1
|
|
|
1
|
1
|
499
|
my $self = shift; |
697
|
1
|
|
|
|
|
5
|
return $self->get_string("getSelectedIndex", @_); |
698
|
|
|
|
|
|
|
} |
699
|
|
|
|
|
|
|
|
700
|
|
|
|
|
|
|
|
701
|
|
|
|
|
|
|
sub get_selected_ids { |
702
|
2
|
|
|
2
|
1
|
512
|
my $self = shift; |
703
|
2
|
|
|
|
|
10
|
return $self->get_string_array("getSelectedIds", @_); |
704
|
|
|
|
|
|
|
} |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
|
707
|
|
|
|
|
|
|
sub get_selected_id { |
708
|
1
|
|
|
1
|
1
|
499
|
my $self = shift; |
709
|
1
|
|
|
|
|
6
|
return $self->get_string("getSelectedId", @_); |
710
|
|
|
|
|
|
|
} |
711
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
|
713
|
|
|
|
|
|
|
sub is_something_selected { |
714
|
1
|
|
|
1
|
1
|
501
|
my $self = shift; |
715
|
1
|
|
|
|
|
7
|
return $self->get_boolean("isSomethingSelected", @_); |
716
|
|
|
|
|
|
|
} |
717
|
|
|
|
|
|
|
|
718
|
|
|
|
|
|
|
|
719
|
|
|
|
|
|
|
sub get_select_options { |
720
|
1
|
|
|
1
|
1
|
536
|
my $self = shift; |
721
|
1
|
|
|
|
|
6
|
return $self->get_string_array("getSelectOptions", @_); |
722
|
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
|
|
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
sub get_attribute { |
726
|
1
|
|
|
1
|
1
|
606
|
my $self = shift; |
727
|
1
|
|
|
|
|
16
|
return $self->get_string("getAttribute", @_); |
728
|
|
|
|
|
|
|
} |
729
|
|
|
|
|
|
|
|
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
sub is_text_present { |
732
|
1
|
|
|
1
|
1
|
525
|
my $self = shift; |
733
|
1
|
|
|
|
|
10
|
return $self->get_boolean("isTextPresent", @_); |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
|
736
|
|
|
|
|
|
|
|
737
|
|
|
|
|
|
|
sub is_element_present { |
738
|
1
|
|
|
1
|
1
|
499
|
my $self = shift; |
739
|
1
|
|
|
|
|
5
|
return $self->get_boolean("isElementPresent", @_); |
740
|
|
|
|
|
|
|
} |
741
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
|
743
|
|
|
|
|
|
|
sub is_visible { |
744
|
1
|
|
|
1
|
1
|
518
|
my $self = shift; |
745
|
1
|
|
|
|
|
6
|
return $self->get_boolean("isVisible", @_); |
746
|
|
|
|
|
|
|
} |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
|
749
|
|
|
|
|
|
|
sub is_editable { |
750
|
1
|
|
|
1
|
1
|
559
|
my $self = shift; |
751
|
1
|
|
|
|
|
5
|
return $self->get_boolean("isEditable", @_); |
752
|
|
|
|
|
|
|
} |
753
|
|
|
|
|
|
|
|
754
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
sub get_all_buttons { |
756
|
1
|
|
|
1
|
1
|
487
|
my $self = shift; |
757
|
1
|
|
|
|
|
7
|
return $self->get_string_array("getAllButtons", @_); |
758
|
|
|
|
|
|
|
} |
759
|
|
|
|
|
|
|
|
760
|
|
|
|
|
|
|
|
761
|
|
|
|
|
|
|
sub get_all_links { |
762
|
1
|
|
|
1
|
1
|
486
|
my $self = shift; |
763
|
1
|
|
|
|
|
5
|
return $self->get_string_array("getAllLinks", @_); |
764
|
|
|
|
|
|
|
} |
765
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
sub get_all_fields { |
768
|
6
|
|
|
6
|
1
|
6932
|
my $self = shift; |
769
|
6
|
|
|
|
|
37
|
return $self->get_string_array("getAllFields", @_); |
770
|
|
|
|
|
|
|
} |
771
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
sub get_attribute_from_all_windows { |
774
|
1
|
|
|
1
|
1
|
569
|
my $self = shift; |
775
|
1
|
|
|
|
|
6
|
return $self->get_string_array("getAttributeFromAllWindows", @_); |
776
|
|
|
|
|
|
|
} |
777
|
|
|
|
|
|
|
|
778
|
|
|
|
|
|
|
|
779
|
|
|
|
|
|
|
sub dragdrop { |
780
|
1
|
|
|
1
|
1
|
596
|
my $self = shift; |
781
|
1
|
|
|
|
|
6
|
$self->do_command("dragdrop", @_); |
782
|
|
|
|
|
|
|
} |
783
|
|
|
|
|
|
|
|
784
|
|
|
|
|
|
|
|
785
|
|
|
|
|
|
|
sub set_mouse_speed { |
786
|
1
|
|
|
1
|
1
|
487
|
my $self = shift; |
787
|
1
|
|
|
|
|
6
|
$self->do_command("setMouseSpeed", @_); |
788
|
|
|
|
|
|
|
} |
789
|
|
|
|
|
|
|
|
790
|
|
|
|
|
|
|
|
791
|
|
|
|
|
|
|
sub get_mouse_speed { |
792
|
1
|
|
|
1
|
1
|
475
|
my $self = shift; |
793
|
1
|
|
|
|
|
7
|
return $self->get_number("getMouseSpeed", @_); |
794
|
|
|
|
|
|
|
} |
795
|
|
|
|
|
|
|
|
796
|
|
|
|
|
|
|
|
797
|
|
|
|
|
|
|
sub drag_and_drop { |
798
|
1
|
|
|
1
|
1
|
490
|
my $self = shift; |
799
|
1
|
|
|
|
|
6
|
$self->do_command("dragAndDrop", @_); |
800
|
|
|
|
|
|
|
} |
801
|
|
|
|
|
|
|
|
802
|
|
|
|
|
|
|
|
803
|
|
|
|
|
|
|
sub drag_and_drop_to_object { |
804
|
1
|
|
|
1
|
1
|
516
|
my $self = shift; |
805
|
1
|
|
|
|
|
6
|
$self->do_command("dragAndDropToObject", @_); |
806
|
|
|
|
|
|
|
} |
807
|
|
|
|
|
|
|
|
808
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
sub window_focus { |
810
|
1
|
|
|
1
|
1
|
469
|
my $self = shift; |
811
|
1
|
|
|
|
|
5
|
$self->do_command("windowFocus", @_); |
812
|
|
|
|
|
|
|
} |
813
|
|
|
|
|
|
|
|
814
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
sub window_maximize { |
816
|
1
|
|
|
1
|
1
|
527
|
my $self = shift; |
817
|
1
|
|
|
|
|
7
|
$self->do_command("windowMaximize", @_); |
818
|
|
|
|
|
|
|
} |
819
|
|
|
|
|
|
|
|
820
|
|
|
|
|
|
|
|
821
|
|
|
|
|
|
|
sub get_all_window_ids { |
822
|
1
|
|
|
1
|
1
|
527
|
my $self = shift; |
823
|
1
|
|
|
|
|
8
|
return $self->get_string_array("getAllWindowIds", @_); |
824
|
|
|
|
|
|
|
} |
825
|
|
|
|
|
|
|
|
826
|
|
|
|
|
|
|
|
827
|
|
|
|
|
|
|
sub get_all_window_names { |
828
|
1
|
|
|
1
|
1
|
609
|
my $self = shift; |
829
|
1
|
|
|
|
|
7
|
return $self->get_string_array("getAllWindowNames", @_); |
830
|
|
|
|
|
|
|
} |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
|
833
|
|
|
|
|
|
|
sub get_all_window_titles { |
834
|
1
|
|
|
1
|
1
|
486
|
my $self = shift; |
835
|
1
|
|
|
|
|
6
|
return $self->get_string_array("getAllWindowTitles", @_); |
836
|
|
|
|
|
|
|
} |
837
|
|
|
|
|
|
|
|
838
|
|
|
|
|
|
|
|
839
|
|
|
|
|
|
|
sub get_html_source { |
840
|
1
|
|
|
1
|
1
|
503
|
my $self = shift; |
841
|
1
|
|
|
|
|
6
|
return $self->get_string("getHtmlSource", @_); |
842
|
|
|
|
|
|
|
} |
843
|
|
|
|
|
|
|
|
844
|
|
|
|
|
|
|
|
845
|
|
|
|
|
|
|
sub set_cursor_position { |
846
|
1
|
|
|
1
|
1
|
474
|
my $self = shift; |
847
|
1
|
|
|
|
|
5
|
$self->do_command("setCursorPosition", @_); |
848
|
|
|
|
|
|
|
} |
849
|
|
|
|
|
|
|
|
850
|
|
|
|
|
|
|
|
851
|
|
|
|
|
|
|
sub get_element_index { |
852
|
1
|
|
|
1
|
1
|
491
|
my $self = shift; |
853
|
1
|
|
|
|
|
7
|
return $self->get_number("getElementIndex", @_); |
854
|
|
|
|
|
|
|
} |
855
|
|
|
|
|
|
|
|
856
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
sub is_ordered { |
858
|
1
|
|
|
1
|
1
|
473
|
my $self = shift; |
859
|
1
|
|
|
|
|
7
|
return $self->get_boolean("isOrdered", @_); |
860
|
|
|
|
|
|
|
} |
861
|
|
|
|
|
|
|
|
862
|
|
|
|
|
|
|
|
863
|
|
|
|
|
|
|
sub get_element_position_left { |
864
|
1
|
|
|
1
|
1
|
477
|
my $self = shift; |
865
|
1
|
|
|
|
|
7
|
return $self->get_number("getElementPositionLeft", @_); |
866
|
|
|
|
|
|
|
} |
867
|
|
|
|
|
|
|
|
868
|
|
|
|
|
|
|
|
869
|
|
|
|
|
|
|
sub get_element_position_top { |
870
|
1
|
|
|
1
|
1
|
534
|
my $self = shift; |
871
|
1
|
|
|
|
|
7
|
return $self->get_number("getElementPositionTop", @_); |
872
|
|
|
|
|
|
|
} |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
|
875
|
|
|
|
|
|
|
sub get_element_width { |
876
|
1
|
|
|
1
|
1
|
543
|
my $self = shift; |
877
|
1
|
|
|
|
|
5
|
return $self->get_number("getElementWidth", @_); |
878
|
|
|
|
|
|
|
} |
879
|
|
|
|
|
|
|
|
880
|
|
|
|
|
|
|
|
881
|
|
|
|
|
|
|
sub get_element_height { |
882
|
1
|
|
|
1
|
1
|
579
|
my $self = shift; |
883
|
1
|
|
|
|
|
6
|
return $self->get_number("getElementHeight", @_); |
884
|
|
|
|
|
|
|
} |
885
|
|
|
|
|
|
|
|
886
|
|
|
|
|
|
|
|
887
|
|
|
|
|
|
|
sub get_cursor_position { |
888
|
1
|
|
|
1
|
1
|
467
|
my $self = shift; |
889
|
1
|
|
|
|
|
5
|
return $self->get_number("getCursorPosition", @_); |
890
|
|
|
|
|
|
|
} |
891
|
|
|
|
|
|
|
|
892
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
sub get_expression { |
894
|
1
|
|
|
1
|
1
|
465
|
my $self = shift; |
895
|
1
|
|
|
|
|
5
|
return $self->get_string("getExpression", @_); |
896
|
|
|
|
|
|
|
} |
897
|
|
|
|
|
|
|
|
898
|
|
|
|
|
|
|
|
899
|
|
|
|
|
|
|
sub get_xpath_count { |
900
|
1
|
|
|
1
|
1
|
482
|
my $self = shift; |
901
|
1
|
|
|
|
|
5
|
return $self->get_number("getXpathCount", @_); |
902
|
|
|
|
|
|
|
} |
903
|
|
|
|
|
|
|
|
904
|
|
|
|
|
|
|
|
905
|
|
|
|
|
|
|
sub assign_id { |
906
|
1
|
|
|
1
|
1
|
487
|
my $self = shift; |
907
|
1
|
|
|
|
|
13
|
$self->do_command("assignId", @_); |
908
|
|
|
|
|
|
|
} |
909
|
|
|
|
|
|
|
|
910
|
|
|
|
|
|
|
|
911
|
|
|
|
|
|
|
sub allow_native_xpath { |
912
|
1
|
|
|
1
|
1
|
508
|
my $self = shift; |
913
|
1
|
|
|
|
|
5
|
$self->do_command("allowNativeXpath", @_); |
914
|
|
|
|
|
|
|
} |
915
|
|
|
|
|
|
|
|
916
|
|
|
|
|
|
|
|
917
|
|
|
|
|
|
|
sub ignore_attributes_without_value { |
918
|
1
|
|
|
1
|
1
|
476
|
my $self = shift; |
919
|
1
|
|
|
|
|
5
|
$self->do_command("ignoreAttributesWithoutValue", @_); |
920
|
|
|
|
|
|
|
} |
921
|
|
|
|
|
|
|
|
922
|
|
|
|
|
|
|
|
923
|
|
|
|
|
|
|
sub wait_for_condition { |
924
|
1
|
|
|
1
|
1
|
538
|
my $self = shift; |
925
|
1
|
|
|
|
|
4
|
local $self->{_timeout} = $_[1]; |
926
|
|
|
|
|
|
|
|
927
|
1
|
|
|
|
|
6
|
$self->do_command("waitForCondition", @_); |
928
|
|
|
|
|
|
|
} |
929
|
|
|
|
|
|
|
|
930
|
|
|
|
|
|
|
|
931
|
|
|
|
|
|
|
sub set_timeout { |
932
|
3
|
|
|
3
|
1
|
11056
|
my $self = shift; |
933
|
3
|
|
|
|
|
14
|
$self->{_timeout} = $_[0]; |
934
|
|
|
|
|
|
|
|
935
|
3
|
|
|
|
|
18
|
$self->do_command("setTimeout", @_); |
936
|
|
|
|
|
|
|
} |
937
|
|
|
|
|
|
|
|
938
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
sub wait_for_page_to_load { |
940
|
1
|
|
|
1
|
1
|
810
|
my $self = shift; |
941
|
1
|
|
|
|
|
6
|
local $self->{_timeout} = $_[1]; |
942
|
|
|
|
|
|
|
|
943
|
1
|
|
|
|
|
9
|
$self->do_command("waitForPageToLoad", @_); |
944
|
|
|
|
|
|
|
} |
945
|
|
|
|
|
|
|
|
946
|
|
|
|
|
|
|
|
947
|
|
|
|
|
|
|
sub wait_for_frame_to_load { |
948
|
1
|
|
|
1
|
1
|
711
|
my $self = shift; |
949
|
1
|
|
|
|
|
4
|
local $self->{_timeout} = $_[1]; |
950
|
|
|
|
|
|
|
|
951
|
1
|
|
|
|
|
5
|
$self->do_command("waitForFrameToLoad", @_); |
952
|
|
|
|
|
|
|
} |
953
|
|
|
|
|
|
|
|
954
|
|
|
|
|
|
|
|
955
|
|
|
|
|
|
|
sub get_cookie { |
956
|
1
|
|
|
1
|
1
|
515
|
my $self = shift; |
957
|
1
|
|
|
|
|
7
|
return $self->get_string("getCookie", @_); |
958
|
|
|
|
|
|
|
} |
959
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
|
961
|
|
|
|
|
|
|
sub get_cookie_by_name { |
962
|
1
|
|
|
1
|
1
|
509
|
my $self = shift; |
963
|
1
|
|
|
|
|
6
|
return $self->get_string("getCookieByName", @_); |
964
|
|
|
|
|
|
|
} |
965
|
|
|
|
|
|
|
|
966
|
|
|
|
|
|
|
|
967
|
|
|
|
|
|
|
sub is_cookie_present { |
968
|
1
|
|
|
1
|
1
|
2078
|
my $self = shift; |
969
|
1
|
|
|
|
|
8
|
return $self->get_boolean("isCookiePresent", @_); |
970
|
|
|
|
|
|
|
} |
971
|
|
|
|
|
|
|
|
972
|
|
|
|
|
|
|
|
973
|
|
|
|
|
|
|
sub create_cookie { |
974
|
1
|
|
|
1
|
1
|
544
|
my $self = shift; |
975
|
1
|
|
|
|
|
6
|
$self->do_command("createCookie", @_); |
976
|
|
|
|
|
|
|
} |
977
|
|
|
|
|
|
|
|
978
|
|
|
|
|
|
|
|
979
|
|
|
|
|
|
|
sub delete_cookie { |
980
|
1
|
|
|
1
|
1
|
491
|
my $self = shift; |
981
|
1
|
|
|
|
|
6
|
$self->do_command("deleteCookie", @_); |
982
|
|
|
|
|
|
|
} |
983
|
|
|
|
|
|
|
|
984
|
|
|
|
|
|
|
|
985
|
|
|
|
|
|
|
sub delete_all_visible_cookies { |
986
|
1
|
|
|
1
|
1
|
479
|
my $self = shift; |
987
|
1
|
|
|
|
|
6
|
$self->do_command("deleteAllVisibleCookies", @_); |
988
|
|
|
|
|
|
|
} |
989
|
|
|
|
|
|
|
|
990
|
|
|
|
|
|
|
|
991
|
|
|
|
|
|
|
sub set_browser_log_level { |
992
|
1
|
|
|
1
|
1
|
453
|
my $self = shift; |
993
|
1
|
|
|
|
|
6
|
$self->do_command("setBrowserLogLevel", @_); |
994
|
|
|
|
|
|
|
} |
995
|
|
|
|
|
|
|
|
996
|
|
|
|
|
|
|
|
997
|
|
|
|
|
|
|
sub run_script { |
998
|
1
|
|
|
1
|
1
|
446
|
my $self = shift; |
999
|
1
|
|
|
|
|
6
|
$self->do_command("runScript", @_); |
1000
|
|
|
|
|
|
|
} |
1001
|
|
|
|
|
|
|
|
1002
|
|
|
|
|
|
|
|
1003
|
|
|
|
|
|
|
sub add_location_strategy { |
1004
|
1
|
|
|
1
|
1
|
492
|
my $self = shift; |
1005
|
1
|
|
|
|
|
6
|
$self->do_command("addLocationStrategy", @_); |
1006
|
|
|
|
|
|
|
} |
1007
|
|
|
|
|
|
|
|
1008
|
|
|
|
|
|
|
|
1009
|
|
|
|
|
|
|
sub capture_entire_page_screenshot { |
1010
|
1
|
|
|
1
|
1
|
597
|
my $self = shift; |
1011
|
1
|
|
|
|
|
6
|
$self->do_command("captureEntirePageScreenshot", @_); |
1012
|
|
|
|
|
|
|
} |
1013
|
|
|
|
|
|
|
|
1014
|
|
|
|
|
|
|
|
1015
|
|
|
|
|
|
|
sub rollup { |
1016
|
1
|
|
|
1
|
1
|
415
|
my $self = shift; |
1017
|
1
|
|
|
|
|
5
|
$self->do_command("rollup", @_); |
1018
|
|
|
|
|
|
|
} |
1019
|
|
|
|
|
|
|
|
1020
|
|
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
sub add_script { |
1022
|
1
|
|
|
1
|
1
|
443
|
my $self = shift; |
1023
|
1
|
|
|
|
|
5
|
$self->do_command("addScript", @_); |
1024
|
|
|
|
|
|
|
} |
1025
|
|
|
|
|
|
|
|
1026
|
|
|
|
|
|
|
|
1027
|
|
|
|
|
|
|
sub remove_script { |
1028
|
1
|
|
|
1
|
1
|
414
|
my $self = shift; |
1029
|
1
|
|
|
|
|
5
|
$self->do_command("removeScript", @_); |
1030
|
|
|
|
|
|
|
} |
1031
|
|
|
|
|
|
|
|
1032
|
|
|
|
|
|
|
|
1033
|
|
|
|
|
|
|
sub use_xpath_library { |
1034
|
1
|
|
|
1
|
1
|
425
|
my $self = shift; |
1035
|
1
|
|
|
|
|
6
|
$self->do_command("useXpathLibrary", @_); |
1036
|
|
|
|
|
|
|
} |
1037
|
|
|
|
|
|
|
|
1038
|
|
|
|
|
|
|
|
1039
|
|
|
|
|
|
|
sub set_context { |
1040
|
1
|
|
|
1
|
1
|
543
|
my $self = shift; |
1041
|
1
|
|
|
|
|
5
|
$self->do_command("setContext", @_); |
1042
|
|
|
|
|
|
|
} |
1043
|
|
|
|
|
|
|
|
1044
|
|
|
|
|
|
|
|
1045
|
|
|
|
|
|
|
sub attach_file { |
1046
|
1
|
|
|
1
|
1
|
408
|
my $self = shift; |
1047
|
1
|
|
|
|
|
6
|
$self->do_command("attachFile", @_); |
1048
|
|
|
|
|
|
|
} |
1049
|
|
|
|
|
|
|
|
1050
|
|
|
|
|
|
|
|
1051
|
|
|
|
|
|
|
sub capture_screenshot { |
1052
|
1
|
|
|
1
|
1
|
450
|
my $self = shift; |
1053
|
1
|
|
|
|
|
5
|
$self->do_command("captureScreenshot", @_); |
1054
|
|
|
|
|
|
|
} |
1055
|
|
|
|
|
|
|
|
1056
|
|
|
|
|
|
|
|
1057
|
|
|
|
|
|
|
sub capture_screenshot_to_string { |
1058
|
1
|
|
|
1
|
1
|
473
|
my $self = shift; |
1059
|
1
|
|
|
|
|
7
|
return $self->get_string("captureScreenshotToString", @_); |
1060
|
|
|
|
|
|
|
} |
1061
|
|
|
|
|
|
|
|
1062
|
|
|
|
|
|
|
|
1063
|
|
|
|
|
|
|
sub capture_entire_page_screenshot_to_string { |
1064
|
1
|
|
|
1
|
1
|
520
|
my $self = shift; |
1065
|
1
|
|
|
|
|
5
|
return $self->get_string("captureEntirePageScreenshotToString", @_); |
1066
|
|
|
|
|
|
|
} |
1067
|
|
|
|
|
|
|
|
1068
|
|
|
|
|
|
|
|
1069
|
|
|
|
|
|
|
sub shut_down_selenium_server { |
1070
|
1
|
|
|
1
|
1
|
457
|
my $self = shift; |
1071
|
1
|
|
|
|
|
5
|
$self->do_command("shutDownSeleniumServer", @_); |
1072
|
|
|
|
|
|
|
} |
1073
|
|
|
|
|
|
|
|
1074
|
|
|
|
|
|
|
|
1075
|
|
|
|
|
|
|
sub retrieve_last_remote_control_logs { |
1076
|
1
|
|
|
1
|
1
|
401
|
my $self = shift; |
1077
|
1
|
|
|
|
|
5
|
return $self->get_string("retrieveLastRemoteControlLogs", @_); |
1078
|
|
|
|
|
|
|
} |
1079
|
|
|
|
|
|
|
|
1080
|
|
|
|
|
|
|
|
1081
|
|
|
|
|
|
|
sub key_down_native { |
1082
|
1
|
|
|
1
|
1
|
405
|
my $self = shift; |
1083
|
1
|
|
|
|
|
5
|
$self->do_command("keyDownNative", @_); |
1084
|
|
|
|
|
|
|
} |
1085
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
|
1087
|
|
|
|
|
|
|
sub key_up_native { |
1088
|
1
|
|
|
1
|
1
|
426
|
my $self = shift; |
1089
|
1
|
|
|
|
|
7
|
$self->do_command("keyUpNative", @_); |
1090
|
|
|
|
|
|
|
} |
1091
|
|
|
|
|
|
|
|
1092
|
|
|
|
|
|
|
|
1093
|
|
|
|
|
|
|
sub key_press_native { |
1094
|
1
|
|
|
1
|
1
|
567
|
my $self = shift; |
1095
|
1
|
|
|
|
|
6
|
$self->do_command("keyPressNative", @_); |
1096
|
|
|
|
|
|
|
} |
1097
|
|
|
|
|
|
|
|
1098
|
|
|
|
|
|
|
|
1099
|
|
|
|
|
|
|
sub wait_for_text_present { |
1100
|
1
|
|
|
1
|
1
|
474
|
my $self = shift; |
1101
|
1
|
|
|
|
|
6
|
$self->do_command("waitForTextPresent", @_); |
1102
|
|
|
|
|
|
|
} |
1103
|
|
|
|
|
|
|
|
1104
|
|
|
|
|
|
|
|
1105
|
|
|
|
|
|
|
sub wait_for_element_present { |
1106
|
1
|
|
|
1
|
1
|
448
|
my $self = shift; |
1107
|
1
|
|
|
|
|
5
|
$self->do_command("waitForElementPresent", @_); |
1108
|
|
|
|
|
|
|
} |
1109
|
|
|
|
|
|
|
|
1110
|
|
|
|
|
|
|
|
1111
|
|
|
|
|
|
|
|
1112
|
|
|
|
|
|
|
sub is_location { |
1113
|
3
|
|
|
3
|
1
|
988
|
my $self = shift; |
1114
|
3
|
50
|
|
|
|
9
|
warn "is_location() is deprecated, use get_location()\n" |
1115
|
|
|
|
|
|
|
unless $self->{no_deprecation_msg}; |
1116
|
3
|
|
|
|
|
4
|
my $expected_location = shift; |
1117
|
3
|
|
|
|
|
11
|
my $loc = $self->get_string("getLocation"); |
1118
|
3
|
|
|
|
|
62
|
return $loc =~ /\Q$expected_location\E$/; |
1119
|
|
|
|
|
|
|
} |
1120
|
|
|
|
|
|
|
|
1121
|
|
|
|
|
|
|
|
1122
|
|
|
|
|
|
|
sub get_checked { |
1123
|
4
|
|
|
4
|
1
|
1823
|
my $self = shift; |
1124
|
4
|
50
|
|
|
|
10
|
warn "get_checked() is deprecated, use is_checked()\n" |
1125
|
|
|
|
|
|
|
unless $self->{no_deprecation_msg}; |
1126
|
4
|
100
|
|
|
|
12
|
return $self->get_string("isChecked", @_) ? 'true' : 'false'; |
1127
|
|
|
|
|
|
|
} |
1128
|
|
|
|
|
|
|
|
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
sub is_selected { |
1131
|
9
|
|
|
9
|
1
|
3650
|
my ($self, $locator, $option_locator) = @_; |
1132
|
9
|
50
|
|
|
|
21
|
warn "is_selected() is deprecated, use get_selected_*() methods\n" |
1133
|
|
|
|
|
|
|
unless $self->{no_deprecation_msg}; |
1134
|
9
|
|
|
|
|
28
|
$option_locator =~ m/^(?:(.+)=)?(.+)/; |
1135
|
9
|
|
100
|
|
|
32
|
my $selector = $1 || 'label'; |
1136
|
9
|
100
|
|
|
|
20
|
$selector = 'indexe' if $selector eq 'index'; |
1137
|
9
|
|
|
|
|
10
|
my $pattern = $2; |
1138
|
9
|
|
|
|
|
13
|
my $func = "get_selected_${selector}s"; |
1139
|
9
|
|
|
|
|
44
|
my @selected = $self->$func($locator); |
1140
|
8
|
|
|
|
|
14
|
return grep { $pattern eq $_ } @selected; |
|
17
|
|
|
|
|
53
|
|
1141
|
|
|
|
|
|
|
} |
1142
|
|
|
|
|
|
|
|
1143
|
|
|
|
|
|
|
|
1144
|
|
|
|
|
|
|
sub get_selected_options { |
1145
|
4
|
|
|
4
|
1
|
2156
|
my $self = shift; |
1146
|
4
|
50
|
|
|
|
13
|
warn "get_selected_options() is deprecated, use get_selected_labels()\n" |
1147
|
|
|
|
|
|
|
unless $self->{no_deprecation_msg}; |
1148
|
4
|
|
|
|
|
12
|
return $self->get_string_array("getSelectedLabels", @_); |
1149
|
|
|
|
|
|
|
} |
1150
|
|
|
|
|
|
|
|
1151
|
|
|
|
|
|
|
|
1152
|
|
|
|
|
|
|
sub get_absolute_location { |
1153
|
2
|
|
|
2
|
1
|
996
|
my $self = shift; |
1154
|
2
|
50
|
|
|
|
6
|
warn "get_absolute_location() is deprecated, use get_location()\n" |
1155
|
|
|
|
|
|
|
unless $self->{no_deprecation_msg}; |
1156
|
2
|
|
|
|
|
8
|
return $self->get_string("getLocation", @_); |
1157
|
|
|
|
|
|
|
} |
1158
|
|
|
|
|
|
|
|
1159
|
|
|
|
|
|
|
|
1160
|
|
|
|
|
|
|
sub DESTROY { |
1161
|
31
|
|
|
31
|
|
53216
|
my $self = shift; |
1162
|
31
|
|
|
|
|
150
|
local $@; |
1163
|
31
|
100
|
|
|
|
255
|
$self->stop if $self->{auto_stop}; |
1164
|
|
|
|
|
|
|
} |
1165
|
|
|
|
|
|
|
|
1166
|
|
|
|
|
|
|
1; |
1167
|
|
|
|
|
|
|
|
1168
|
|
|
|
|
|
|
__END__ |