|
@@ -3,7 +3,7 @@ package Selenium::Remote::WebElement;
|
|
|
# ABSTRACT: Representation of an HTML Element used by Selenium Remote Driver
|
|
# ABSTRACT: Representation of an HTML Element used by Selenium Remote Driver
|
|
|
|
|
|
|
|
use Moo;
|
|
use Moo;
|
|
|
-use Carp qw(croak);
|
|
|
|
|
|
|
+use Carp qw(carp croak);
|
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
=head1 DESCRIPTION
|
|
|
|
|
|
|
@@ -356,19 +356,18 @@ sub is_hidden {
|
|
|
Usage:
|
|
Usage:
|
|
|
$elem->drag(216,158);
|
|
$elem->drag(216,158);
|
|
|
|
|
|
|
|
|
|
+ Note: DEPRECATED - drag is no longer available in the
|
|
|
|
|
+ JSONWireProtocol. We are working on an ActionsChains implementation,
|
|
|
|
|
+ but drag and drop doesn't currently work on the Webdriver side for
|
|
|
|
|
+ HTML5 pages. For reference, see:
|
|
|
|
|
+
|
|
|
|
|
+ http://elementalselenium.com/tips/39-drag-and-drop
|
|
|
|
|
+ https://gist.github.com/rcorreia/2362544
|
|
|
|
|
+
|
|
|
=cut
|
|
=cut
|
|
|
|
|
|
|
|
sub drag {
|
|
sub drag {
|
|
|
- my ( $self, $x, $y ) = @_;
|
|
|
|
|
- if ( ( not defined $x ) || ( not defined $y ) ) {
|
|
|
|
|
- croak 'X & Y pixel coordinates not provided';
|
|
|
|
|
- }
|
|
|
|
|
- my $res = { 'command' => 'dragElement', 'id' => $self->id };
|
|
|
|
|
- my $params = {
|
|
|
|
|
- 'x' => $x,
|
|
|
|
|
- 'y' => $y,
|
|
|
|
|
- };
|
|
|
|
|
- return $self->_execute_command( $res, $params );
|
|
|
|
|
|
|
+ carp 'drag is no longer available in the JSONWireProtocol and will be removed in the next version of this module';
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
=head2 get_size
|
|
=head2 get_size
|