Răsfoiți Sursa

Fix #368: Finally admit chromedriver isn't a WC3 capable driver

George S. Baugh 7 ani în urmă
părinte
comite
ec88d3741d
3 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 1 0
      Changes
  2. 1 1
      dist.ini
  3. 6 0
      lib/Selenium/Remote/Driver.pm

+ 1 - 0
Changes

@@ -3,6 +3,7 @@ Revision history for Selenium-Remote-Driver
 1.25   02-15-2018 TEODESIAN
         [BUG FIXES]
         - Fix issue where only <form> elements and not <input> elements could be submit()ted.
+        - Force chrome into using JSONWire style capabilities passing, as WC3 style is just horribly broken on chromedriver.
 
 1.24   02-12-2018 TEODESIAN
         [BUG FIXES]

+ 1 - 1
dist.ini

@@ -1,5 +1,5 @@
 name = Selenium-Remote-Driver
-version = 1.24
+version = 1.25
 author = George S. Baugh <george@troglodyne.net>
 author = Aditya Ivaturi <ivaturi@gmail.com>
 author = Daniel Gempesaw <gempesaw@gmail.com>

+ 6 - 0
lib/Selenium/Remote/Driver.pm

@@ -241,6 +241,8 @@ Other bindings get around this by just using the 'old' way of passing desired ca
 
     $Selenium::Remote::Driver::FORCE_WD2=1;
 
+This is now forced on during construction for chrome.
+
 =head1 CONSTRUCTOR
 
 =head2 new
@@ -857,6 +859,10 @@ DANGER DANGER DANGER
 sub new_session {
     my ( $self, $extra_capabilities ) = @_;
     $extra_capabilities ||= {};
+
+    #XXX chromedriver is broken
+    $FORCE_WD2 = 1 if $self->browser_name eq 'chrome';
+
     my $args = {
         'desiredCapabilities' => {
             'browserName'        => $self->browser_name,