|
|
@@ -1023,6 +1023,14 @@ sub _request_new_session {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ #Fix broken out of the box chrome because they hate the maintainers of their interfaces
|
|
|
+ if ( $self->isa('Selenium::Chrome') ) {
|
|
|
+ if ( exists $args->{desiredCapabilities} ) {
|
|
|
+ $args->{desiredCapabilities}{chromeOptions}{args} //= [];
|
|
|
+ push(@{$args->{desiredCapabilities}{chromeOptions}{args}}, qw{no-sandbox disable-dev-shm-usage});
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
# Get actual status
|
|
|
$self->remote_conn->check_status();
|
|
|
|
|
|
@@ -1037,6 +1045,10 @@ sub _request_new_session {
|
|
|
my $rc = $self->remote_conn;
|
|
|
my $resp = $rc->request( $resource_new_session, $args, );
|
|
|
|
|
|
+ if ( $resp->{cmd_status} && $resp->{cmd_status} eq 'NOT OK' ) {
|
|
|
+ croak "Could not obtain new session: ". $resp->{cmd_return}{message};
|
|
|
+ }
|
|
|
+
|
|
|
if ( ( defined $resp->{'sessionId'} ) && $resp->{'sessionId'} ne '' ) {
|
|
|
$self->session_id( $resp->{'sessionId'} );
|
|
|
}
|