Sha256: be7a9a657bc5ee4c0cedac32d42586c1686892a7c6da4621aaa9b3533dd31d2d

Contents?: true

Size: 1.23 KB

Versions: 12

Compression:

Stored size: 1.23 KB

Contents

require 'websocket'
require 'pathname'

module Selenium
  module WebDriver
    module Safari

      class << self
        def path=(path)
          Platform.assert_executable(path)
          @path = path
        end

        def path
          @path ||= (
            path = case Platform.os
                   when :windows
                     Platform.find_in_program_files("Safari\\Safari.exe")
                   when :macosx
                     "/Applications/Safari.app/Contents/MacOS/Safari"
                   else
                     Platform.find_binary("Safari")
                   end

            unless File.file?(path) && File.executable?(path)
              raise Error::WebDriverError, "unable to find the Safari executable, please set Selenium::WebDriver::Safari.path= or add it to your PATH."
            end

            path
          )
        end

        def resource_path
          @resource_path ||= Pathname.new(File.expand_path("../safari/resources", __FILE__))
        end
      end

    end
  end
end

require 'selenium/webdriver/safari/browser'
require 'selenium/webdriver/safari/server'
require 'selenium/webdriver/safari/extensions'
require 'selenium/webdriver/safari/options'
require 'selenium/webdriver/safari/bridge'

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
selenium-webdriver-2.45.0 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.45.0.dev3 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.45.0.dev2 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.45.0.dev lib/selenium/webdriver/safari.rb
selenium-webdriver-2.44.0 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.44.0.dev lib/selenium/webdriver/safari.rb
selenium-webdriver-2.43.0 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.42.0 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.41.0 lib/selenium/webdriver/safari.rb
browserstack-webdriver-2.40.1 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.40.0 lib/selenium/webdriver/safari.rb
selenium-webdriver-2.40.0.rc2 lib/selenium/webdriver/safari.rb