Skip to content

Commit

Permalink
Fix #396 & #393: do restricted sanitization of caps for geckodriver
Browse files Browse the repository at this point in the history
In the fix to #371, we just nuked them from orbit.
Obviously this means caps were ignored, but I could see no other
option to get the darn thing working.

I had the right guess today though, and this should fix those regressions.
  • Loading branch information
teodesian committed Aug 17, 2018
1 parent 5b7a944 commit 60f4400
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/Selenium/Remote/Driver.pm
Expand Up @@ -963,8 +963,11 @@ sub _request_new_session {

#Delete compatibility layer when using drivers directly
if ($self->isa('Selenium::Firefox')) {
delete $args->{capabilities};
delete $args->{extra_capabilities};
if ( exists $args->{capabilities} && exists $args->{capabilities}->{alwaysMatch} ) {
delete $args->{capabilities}->{alwaysMatch}->{browserName};
delete $args->{capabilities}->{alwaysMatch}->{browserVersion};
delete $args->{capabilities}->{alwaysMatch}->{platformName};
}
}

# geckodriver has not yet implemented the GET /status endpoint
Expand Down

0 comments on commit 60f4400

Please sign in to comment.