Sha256: ab6e3d81b6187940f80504606dbb9ed500d7f684e626e8dd80649423af933d13

Contents?: true

Size: 735 Bytes

Versions: 4

Compression:

Stored size: 735 Bytes

Contents

require 'selenium-webdriver'
require 'rutl/interface/base_interface'

#
# Small interface for Chrome browser.
#
class FirefoxInterface < BaseInterface
  def initialize
    @logged_in = true
    options = Selenium::WebDriver::Firefox::Options.new
    options.add_argument('--ignore-certificate-errors')
    options.add_argument('--disable-popup-blocking')
    options.add_argument('--disable-translate')
    options.add_argument('--headless') if ENV['TRAVIS'] == 'true'
    @driver = Selenium::WebDriver.for :firefox, options: options
    super
  end

  def current_page
    url = @driver.current_url
    page = find_page(url)
    raise "PAGE NOT FOUND: #{url}, PAGES: #{@pages}" unless page
    page
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rutl-0.3.0 lib/rutl/interface/firefox_interface.rb
rutl-0.2.1 lib/rutl/interface/firefox_interface.rb
rutl-0.2.0 lib/rutl/interface/firefox_interface.rb
rutl-0.1.4 lib/rutl/interface/firefox_interface.rb