Class: Selenium::Phantomjs::WebDriver

Inherits:
Instance
  • Object
show all
Defined in:
lib/selenium/phantomjs/web_driver.rb

Constant Summary collapse

LOG =
'log/phantomjs.log'.freeze
LOGLEVEL =
'WARN'.freeze
SELENIUM_GRID_URL =
"http://#{Selenium::WebDriver::Platform.localhost}:4444".freeze

Constants inherited from Instance

Instance::PHANTOMJS_BIN

Instance Attribute Summary

Attributes inherited from Instance

#pid_file

Instance Method Summary collapse

Methods inherited from Instance

#alive?, #die!, #initialize, #pid

Constructor Details

This class inherits a constructor from Selenium::Phantomjs::Instance

Instance Method Details

#run(args = {}, options = {[:out, :err] => [LOG, 'a']}) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/selenium/phantomjs/web_driver.rb', line 8

def run(args = {}, options = {[:out, :err] => [LOG, 'a']})
  phantomjs_args = {
    :'webdriver-selenium-grid-hub' => SELENIUM_GRID_URL,
    :'webdriver-loglevel'          => LOGLEVEL
  }.merge(args).merge(wd: nil)

  super(phantomjs_args, options)
end