This repository has been archived by the owner on Jan 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated Selenium::Remote::Driver to latest v1.39.
- Loading branch information
Showing
24 changed files
with
124 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package Selenium::Remote::Driver; | ||
$Selenium::Remote::Driver::VERSION = '1.38'; | ||
$Selenium::Remote::Driver::VERSION = '1.39'; | ||
use strict; | ||
use warnings; | ||
|
||
|
@@ -230,6 +230,11 @@ has 'firefox_profile' => ( | |
clearer => 1 | ||
); | ||
|
||
has debug => ( | ||
is => 'lazy', | ||
default => sub { 0 }, | ||
); | ||
|
||
has 'desired_capabilities' => ( | ||
is => 'lazy', | ||
predicate => 'has_desired_capabilities' | ||
|
@@ -290,6 +295,9 @@ sub BUILD { | |
$self->set_inner_window_size(@$size); | ||
} | ||
|
||
#Set debug if needed | ||
$self->debug_on() if $self->debug; | ||
|
||
# Setup non-croaking, parameter versions of finders | ||
foreach my $by ( keys %{ $self->FINDERS } ) { | ||
my $finder_name = 'find_element_by_' . $by; | ||
|
@@ -419,7 +427,7 @@ sub new_session { | |
'browserName' => $self->browser_name, | ||
'platform' => $self->platform, | ||
'javascriptEnabled' => $self->javascript, | ||
'version' => $self->version, | ||
'version' => $self->version // '', | ||
'acceptSslCerts' => $self->accept_ssl_certs, | ||
%$extra_capabilities, | ||
}, | ||
|
@@ -1142,6 +1150,7 @@ sub switch_to_frame { | |
$id = ( defined $id ) ? $id : $json_null; | ||
|
||
my $res = { 'command' => 'switchToFrame' }; | ||
|
||
if ( ref $id eq $self->webelement_class ) { | ||
if ( $self->{is_wd3} ) { | ||
$params = | ||
|
@@ -1656,7 +1665,8 @@ sub _get_button { | |
return $button_enum->{ uc $1 }; | ||
} | ||
if ( defined $button && $button =~ /(0|1|2)/ ) { | ||
return $1; | ||
#Handle user error sending in "1" | ||
return int($1); | ||
} | ||
return 0; | ||
} | ||
|
@@ -1672,7 +1682,7 @@ sub double_click { | |
{ | ||
$self->click( $button, 1 ); | ||
$self->click( $button, 1 ); | ||
$self->general_action(); | ||
return $self->general_action(); | ||
} | ||
|
||
my $res = { 'command' => 'doubleClick' }; | ||
|
@@ -1880,7 +1890,7 @@ Selenium::Remote::Driver - Perl Client for Selenium Remote Driver | |
=head1 VERSION | ||
version 1.38 | ||
version 1.39 | ||
=head1 SYNOPSIS | ||
|
@@ -2141,6 +2151,8 @@ Desired capabilities - HASH - Following options are accepted: | |
=item B<extra_capabilities> - HASH - Any other extra capabilities. Accepted keys will vary by browser. If firefox_profile is passed, the args (or profile) key will be overwritten, depending on how it was passed. | ||
=item B<debug> - BOOL - Turn Debug mode on from the start if true, rather than having to call debug_on(). | ||
=back | ||
On WebDriver3 the 'extra_capabilities' will be automatically converted into the parameter needed by your browser. | ||
|
@@ -2556,6 +2568,16 @@ Called with no arguments, it simply executes the existing action queue. | |
If you are looking for pre-baked action chains that aren't currently part of L<Selenium::Remote::Driver>, | ||
consider L<Selenium::ActionChains>, which is shipped with this distribution instead. | ||
=head3 COMPATIBILITY | ||
Like most places, the WC3 standard is openly ignored by the driver binaries. | ||
Generally an "actions" object will only accept: | ||
{ type => ..., value => ... } | ||
When using the direct drivers (E.G. Selenium::Chrome, Selenium::Firefox). | ||
This is not documented anywhere but here, as far as I can tell. | ||
=head2 release_general_action | ||
Nukes *all* input device state (modifier key up/down, pointer button up/down, pointer location, and other device state) from orbit. | ||
|
@@ -2980,6 +3002,10 @@ To conveniently write the screenshot to a file, see L</capture_screenshot>. | |
or | ||
$driver->switch_to_frame($driver->find_element('iframe', 'tag_name')); | ||
=head3 COMPATIBILITY | ||
Chromedriver will vomit if you pass anything but a webElement, so you probably should do that from now on. | ||
=head2 switch_to_parent_frame | ||
Webdriver 3 equivalent of calling switch_to_frame with no arguments (e.g. NULL frame). | ||
|
@@ -3731,7 +3757,7 @@ Aditya Ivaturi <[email protected]> | |
=head1 CONTRIBUTORS | ||
=for stopwords Allen Lew A.MacLeay Andy Jack Bas Bloemsaat Blake GH Brian Horakh Charles Howes Chris Davies Daniel Fackrell Dave Rolsky Dmitry Karasik Doug Bell Dylan Streb Eric Johnson Gabor Szabo George S. Baugh Gerhard Jungwirth Gordon Child GreatFlamingFoo Ivan Kurmanov Joe Higton Jon Hermansen Keita Sugama Ken Swanson lembark Luke Closs Martin Gruner Matthew Spahr Max O'Cull Michael Prokop mk654321 Peter Mottram (SysPete) Phil Kania Mitchell Prateek Goyal Richard Sailer Robert Utter rouzier Tetsuya Tatsumi Tod Hagan Tom Hukins Vangelis Katsikaros Vishwanath Janmanchi Viťas Strádal Yves Lavoie | ||
=for stopwords Allen Lew A.MacLeay Andy Jack Bas Bloemsaat Blake GH Brian Horakh Charles Howes Chris Davies Daniel Fackrell Dave Rolsky Dmitry Karasik Doug Bell Dylan Streb Eric Johnson Gabor Szabo George S. Baugh Gerhard Jungwirth Gordon Child GreatFlamingFoo Ivan Kurmanov Joe Higton Jon Hermansen Keita Sugama Ken Swanson lembark Luke Closs Martin Gruner Matthew Spahr Max O'Cull Michael Prokop mk654321 Peter Mottram (SysPete) Phil Kania Mitchell Prateek Goyal Richard Sailer Robert Utter rouzier Tetsuya Tatsumi Tod Hagan Tom Hukins Vangelis Katsikaros Vishwanath Janmanchi Viťas Strádal Yuki Kimoto Yves Lavoie | ||
=over 4 | ||
|
@@ -3921,6 +3947,10 @@ Viťas Strádal <[email protected]> | |
=item * | ||
Yuki Kimoto <[email protected]> | ||
=item * | ||
Yves Lavoie <[email protected]> | ||
=back | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.