File Coverage

blib/lib/Appium/SwitchTo.pm
Criterion Covered Total %
statement 7 7 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 10 10 100.0


line stmt bran cond sub pod time code
1             package Appium::SwitchTo;
2             $Appium::SwitchTo::VERSION = '0.0804';
3             # ABSTRACT: Provide access to Appium's context switching functionality
4 5     5   35 use Moo;
  5         9  
  5         26  
5              
6             has 'driver' => (
7             is => 'ro',
8             required => 1,
9             handles => [qw/_execute_command/]
10             );
11              
12              
13             sub context {
14 2     2 1 2795 my ($self, $context_name ) = @_;
15              
16 2         7 my $res = { command => 'switch_to_context' };
17 2         6 my $params = { name => $context_name };
18              
19 2         41 return $self->_execute_command( $res, $params );
20             }
21              
22             1;
23              
24             __END__