marathon-core/ruby-selenium-webdriver/src/main/resources/gems/selenium-webdriver-3.6.0/lib/selenium/webdriver/remote/bridge.rb
def create_session(desired_capabilities)
          response = execute(:new_session, {}, merged_capabilities(desired_capabilities))

          @session_id = response['sessionId']
          oss_status = response['status']
          value = response['value']

          if value.is_a?(Hash)
            @session_id = value['sessionId'] if value.key?('sessionId')

            if value.key?('capabilities')
              value = value['capabilities']
            elsif value.key?('value')
              value = value['value']
            end
          end

          unless @session_id
            raise Error::WebDriverError, 'no sessionId in returned payload'
          end

          if oss_status
            WebDriver.logger.info 'Detected OSS dialect.'
            @dialect = :oss
            Capabilities.json_create(value)
          else
            WebDriver.logger.info 'Detected W3C dialect.'
            @dialect = :w3c
            W3C::Capabilities.json_create(value)
          end
        end
#
# Creates session handling both OSS and W3C dialects.
#
Creates session handling both OSS and W3C dialects.
Creates session handling both OSS and W3C dialects .
def create_session(desired_capabilities)
          response = execute(:new_session, {}, merged_capabilities(desired_capabilities))
          @session_id = response['sessionId']
          oss_status = response['status']
          value = response['value']
          if value.is_a?(Hash)
            @session_id = value['sessionId'] if value.key?('sessionId')
            if value.key?('capabilities')
              value = value['capabilities']
            elsif value.key?('value')
              value = value['value']
            end
          end
          unless @session_id
            raise Error::WebDriverError, 'no sessionId in returned payload'
          end
          if oss_status
            WebDriver.logger.info 'Detected OSS dialect.'
            @dialect = :oss
            Capabilities.json_create(value)
          else
            WebDriver.logger.info 'Detected W3C dialect.'
            @dialect = :w3c
            W3C::Capabilities.json_create(value)
          end
        end
def create_session ( desired_capabilities ) response = execute ( :new_session , { } , merged_capabilities ( desired_capabilities ) ) @session_id = response [ 'sessionId' ] oss_status = response [ 'status' ] value = response [ 'value' ] if value . is_a? ( Hash ) @session_id = value [ 'sessionId' ] if value . key? ( 'sessionId' ) if value . key? ( 'capabilities' ) value = value [ 'capabilities' ] elsif value . key? ( 'value' ) value = value [ 'value' ] end end unless @session_id raise Error :: WebDriverError , 'no sessionId in returned payload' end if oss_status WebDriver . logger . info 'Detected OSS dialect.' @dialect = :oss Capabilities . json_create ( value ) else WebDriver . logger . info 'Detected W3C dialect.' @dialect = :w3c W3C :: Capabilities . json_create ( value ) end end
Creates session handling both OSS and W3C dialects.
Creates session handling both OSS and W3C dialects .
desired_capabilities