Appium
view release on metacpan or search on metacpan
lib/Appium.pm view on Meta::CPAN
croak 'Please specify selection criteria'
unless scalar @selector;
my $res = { command => 'complex_find' };
my $params = { selector => \@selector };
return $self->_execute_command( $res, $params );
}
sub background_app {
my ($self, $seconds) = @_;
my $res = { command => 'background_app' };
my $params = { seconds => $seconds};
return $self->_execute_command( $res, $params );
}
sub is_app_installed {
my ($self, $bundle_id) = @_;
my $res = { command => 'is_app_installed' };
lib/Appium.pm view on Meta::CPAN
$appium->push_file( '/file/path', $base64_data );
=head2 complex_find ( $selector )
Search for elements in the current application, given an array of
selection criteria.
$appium->complex_find( $selector );
=head2 background_app ( $time_in_seconds )
Defer the application to the background on the device for the
interval, given in seconds.
$appium->background_app( 5 );
=head2 is_app_installed ( $bundle_id )
Check whether the application with the specified C<bundle_id> is
installed on the device.
$appium->is_app_installed( $bundle_id );
=head2 install_app ( $app_path )
lib/Appium/Commands.pm view on Meta::CPAN
push_file => {
method => 'POST',
url => 'session/:sessionId/appium/device/push_file',
no_content_success => 1
},
complex_find => {
method => 'POST',
url => 'session/:sessionId/appium/app/complex_find',
no_content_success => 1
},
background_app => {
method => 'POST',
url => 'session/:sessionId/appium/app/background',
no_content_success => 1
},
is_app_installed => {
method => 'POST',
url => 'session/:sessionId/appium/device/app_installed',
no_content_success => 1
},
install_app => {
method => 'POST',
url => 'session/:sessionId/appium/device/install_app',
endpoint_ok('pull_folder', [ $path ], { path => $path });
endpoint_ok('push_file', [ $path, $data ], { path => $path, data => $data });
}
FIND: {
my @selector = qw/fake selection critera/;
endpoint_ok('complex_find', [ @selector ], { selector => \@selector });
}
APP: {
endpoint_ok('background_app', [ 5 ], { seconds => 5 });
endpoint_ok('is_app_installed', [ 'a fake bundle id' ], { bundleId => 'a fake bundle id' });
endpoint_ok('install_app', [ '/fake/path/to.app' ], { appPath => '/fake/path/to.app' });
endpoint_ok('remove_app', [ '/fake/path/to.app' ], { appId => '/fake/path/to.app' });
endpoint_ok('launch_app');
endpoint_ok('close_app');
}
DEVICE: {
endpoint_ok('lock', [ 5 ], { seconds => 5 });
endpoint_ok('is_locked');
t/Commands.t view on Meta::CPAN
BAIL_OUT("Couldn't load Appium::Commands");
exit;
}
}
my $mock_appium = MockAppium->new;
my @implemented = qw/
app_strings
background_app
close_app
complex_find
contexts
current_activity
current_context
end_test_coverage
hide_keyboard
install_app
is_app_installed
launch_app
( run in 0.947 second using v1.01-cache-2.11-cpan-f56aa216473 )