Module: Selenium::WebDriver::PhantomJS

Defined in:
lib/selenium/webdriver/phantomjs.rb,
lib/selenium/webdriver/phantomjs/bridge.rb,
lib/selenium/webdriver/phantomjs/service.rb

Defined Under Namespace

Classes: Bridge, Service

Class Method Summary collapse

Class Method Details

.path(warning = true) ⇒ Object



38
39
40
41
42
43
44
45
46
47
# File 'lib/selenium/webdriver/phantomjs.rb', line 38

def self.path(warning = true)
  if warning
    warn <<-DEPRECATE.gsub(/\n +| {2,}/, ' ').freeze
      [DEPRECATION] `path` is deprecated. Pass the driver path as an option instead.
      e.g. Selenium::WebDriver.for :phantomjs, driver_path: '/path'
    DEPRECATE
  end

  @path ||= nil
end

.path=(path) ⇒ Object



28
29
30
31
32
33
34
35
36
# File 'lib/selenium/webdriver/phantomjs.rb', line 28

def self.path=(path)
  warn <<-DEPRECATE.gsub(/\n +| {2,}/, ' ').freeze
    [DEPRECATION] `path=` is deprecated. Pass the driver path as an option instead.
    e.g. Selenium::WebDriver.for :phantomjs, driver_path: '/path'
  DEPRECATE

  Platform.assert_executable path
  @path = path
end