Sha256: c1ed0ad149a088fbc82cecba638c683fca6395e4936fe9804a09360b1c4ebddc

Contents?: true

Size: 648 Bytes

Versions: 3

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

require 'capybara/selenium/extensions/html5_drag'

class Capybara::Selenium::ChromeNode < Capybara::Selenium::Node
  include Html5Drag

  def set_file(value) # rubocop:disable Naming/AccessorMethodName
    super(value)
  rescue ::Selenium::WebDriver::Error::ExpectedError => err
    if err.message =~ /File not found : .+\n.+/m
      raise ArgumentError, "Selenium < 3.14 with remote Chrome doesn't support multiple file upload"
    end
    raise
  end

  def drag_to(element)
    return super unless html5_draggable?
    html5_drag_to(element)
  end

private

  def bridge
    driver.browser.send(:bridge)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
capybara-3.8.2 lib/capybara/selenium/nodes/chrome_node.rb
capybara-3.8.1 lib/capybara/selenium/nodes/chrome_node.rb
capybara-3.8.0 lib/capybara/selenium/nodes/chrome_node.rb