Sha256: 8e83acf1b737c6a77c7c314f9259dd6b951c917c7cf4465c323342bff91dafd3

Contents?: true

Size: 836 Bytes

Versions: 1

Compression:

Stored size: 836 Bytes

Contents

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

module RUTL
  module Interface
    #
    # Small interface for Chrome browser.
    #
    class Firefox < Base
      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
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rutl-0.6.0 lib/rutl/interface/firefox.rb