Explorar el Código

Merge pull request #1 from teodesian/master

get latest commits from teodesian
Bernhard Schmalhofer hace 4 años
padre
commit
d6bdeb2d8c
Se han modificado 7 ficheros con 22 adiciones y 32 borrados
  1. 3 2
      Changes
  2. 1 1
      lib/Selenium/CanStartBinary/FindBinary.pm
  3. 1 1
      lib/Selenium/Edge.pm
  4. 3 16
      lib/Selenium/Remote/Driver.pm
  5. 1 1
      t/01-driver.t
  6. 1 1
      t/02-webelement.t
  7. 12 10
      weaver.ini

+ 3 - 2
Changes

@@ -1,7 +1,8 @@
 Revision history for Selenium-Remote-Driver
 
-1.40  12-04-2020 TEODESIAN
-        [BUG FIX]
+1.40  02-03-2021 TEODESIAN
+        [BUG FIXES]
+        - suppress warning in CanStartBinary when geckodriver not in PWD
         - fix double_click
 
 1.39  10-20-2020 TEODESIAN

+ 1 - 1
lib/Selenium/CanStartBinary/FindBinary.pm

@@ -48,7 +48,7 @@ sub _validate_manual_binary {
 
     my $abs_executable = eval {
         my $path = abs_path($executable);
-        die unless -e $path;
+        die if $path && !-f $path;
         $path;
     };
 

+ 1 - 1
lib/Selenium/Edge.pm

@@ -52,7 +52,7 @@ anything, we'll try to find it on our own via L<File::Which/which>.
 has 'binary' => (
     is        => 'lazy',
     coerce    => \&coerce_simple_binary,
-    default   => sub { 'MicrosoftWebDriver.exe' },
+    default   => sub { 'msedgedriver.exe' },
     predicate => 1
 );
 

+ 3 - 16
lib/Selenium/Remote/Driver.pm

@@ -1044,7 +1044,7 @@ sub _request_new_session {
       if $FORCE_WD2; #XXX 'secret' feature to help the legacy unit tests to work
 
     #Delete compatibility layer when using drivers directly
-    if ( $self->isa('Selenium::Firefox') || $self->isa('Selenium::Chrome') ) {
+    if ( $self->isa('Selenium::Firefox') || $self->isa('Selenium::Chrome') || $self->isa('Selenium::Edge') ) {
         if (   exists $args->{capabilities}
             && exists $args->{capabilities}->{alwaysMatch} )
         {
@@ -3572,7 +3572,7 @@ sub _prepare_file {
 =head2 get_text
 
  Description:
-    Get the text of a particular element. Wrapper around L<find_element()>
+    Get the text of a particular element. Wrapper around L</find_element>
 
  Usage:
     $text = $driver->get_text("//div[\@name='q']");
@@ -3588,7 +3588,7 @@ sub get_text {
 
  Description:
     Get the current text for the whole body. If you want the entire raw HTML instead,
-    See L<get_page_source>.
+    See L</get_page_source>.
 
  Usage:
     $body_text = $driver->get_body();
@@ -3745,16 +3745,3 @@ sub _coerce_number {
 }
 
 1;
-
-__END__
-
-=head1 SEE ALSO
-
-L<https://github.com/SeleniumHQ/selenium> - the main selenium RC project
-L<https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol> - the "legacy" webdriver specification
-L<https://www.w3.org/TR/webdriver/> - the WC3 WebDriver 3 specification
-L<https://github.com/teodesian/Selenium-Remote-Driver/wiki>
-Brownie
-Wight
-
-=cut

+ 1 - 1
t/01-driver.t

@@ -6,7 +6,7 @@ use Test::More;
 use LWP::UserAgent;
 use Test::LWP::UserAgent;
 use IO::Socket::INET;
-use Test::MockModule;
+use Test::MockModule v0.13;
 use Selenium::Remote::Driver;
 use Selenium::Remote::Mock::Commands;
 use Selenium::Remote::Mock::RemoteConnection;

+ 1 - 1
t/02-webelement.t

@@ -2,7 +2,7 @@ use strict;
 use warnings;
 
 use Test::More;
-use Test::MockModule;
+use Test::MockModule v0.13;
 use Selenium::Remote::Driver;
 use Selenium::Remote::Mock::RemoteConnection;
 

+ 12 - 10
weaver.ini

@@ -22,9 +22,6 @@ command = func
 
 [Leftovers]
 
-[SeeAlso]
-[Bugs]
-
 [Region  / postlude]
 
 ; [Authors]
@@ -35,11 +32,7 @@ text = =over 4
 text =
 text = =item *
 text =
-text = Daniel Gempesaw <gempesaw@gmail.com>
-text =
-text = =item *
-text =
-text = Emmanuel Peroumalnaïk <peroumalnaik.emmanuel@gmail.com>
+text = George S. Baugh <george@troglodyne.net>
 text =
 text = =back
 text =
@@ -49,6 +42,14 @@ text = =over 4
 text =
 text = =item *
 text =
+text = Daniel Gempesaw <gempesaw@gmail.com>
+text =
+text = =item *
+text =
+text = Emmanuel Peroumalnaïk <peroumalnaik.emmanuel@gmail.com>
+text =
+text = =item *
+text =
 text = Luke Closs <cpan@5thplane.com>
 text =
 text = =item *
@@ -67,13 +68,14 @@ text = Aditya Ivaturi <ivaturi@gmail.com>
 text =
 text = =back
 
-
 [Contributors]
 [GenerateSection / COPYRIGHT AND LICENSE]
 text = Copyright (c) 2010-2011 Aditya Ivaturi, Gordon Child
 text =
 text = Copyright (c) 2014-2017 Daniel Gempesaw
 text =
+text = Copyright (c) 2018-2021 George S. Baugh
+text =
 text = Licensed under the Apache License, Version 2.0 (the "License");
 text = you may not use this file except in compliance with the License.
 text = You may obtain a copy of the License at
@@ -88,4 +90,4 @@ text = limitations under the License.
 
 
 [-Transformer]
-transformer = List
+transformer = List