line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Appium::TouchActions; |
2
|
|
|
|
|
|
|
$Appium::TouchActions::VERSION = '0.0803'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Perform touch actions through appium: taps, swipes, scrolling |
4
|
1
|
|
|
1
|
|
473
|
use Moo; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
has 'driver' => ( |
7
|
|
|
|
|
|
|
is => 'ro', |
8
|
|
|
|
|
|
|
required => 1, |
9
|
|
|
|
|
|
|
handles => [ qw/execute_script/ ] |
10
|
|
|
|
|
|
|
); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub tap { |
14
|
1
|
|
|
1
|
1
|
1123
|
my ($self, @coords) = @_; |
15
|
|
|
|
|
|
|
|
16
|
1
|
|
|
|
|
4
|
my $params = { |
17
|
|
|
|
|
|
|
x => $coords[0], |
18
|
|
|
|
|
|
|
y => $coords[1] |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
4
|
$self->execute_script('mobile: tap', $params); |
22
|
|
|
|
|
|
|
|
23
|
1
|
|
|
|
|
624
|
return $self->driver; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
1; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
__END__ |