module Selenium::Phantomjs
Constants
- VERSION
Public Instance Methods
options()
click to toggle source
# File lib/selenium/phantomjs.rb, line 30 def options { browser: :remote, url: "#{WebDriver::SELENIUM_GRID_URL}/wd/hub", desired_capabilities: { browserName: :phantomjs } } end
register_driver()
click to toggle source
# File lib/selenium/phantomjs.rb, line 15 def register_driver begin require 'selenium/webdriver' rescue LoadError end Phantomjs.start if defined? Selenium::WebDriver Capybara.register_driver :selenium_phantomjs do |app| Capybara::Selenium::Driver.new(app, options) end end end
start(args = {})
click to toggle source
# File lib/selenium/phantomjs.rb, line 11 def start(args = {}) WebDriver.new('tmp/pids/phantomjs.pid').run(args) end