Class: FirefoxInterface
- Inherits:
-
BaseInterface
- Object
- BaseInterface
- FirefoxInterface
- Defined in:
- lib/rutl/interface/firefox_interface.rb
Overview
Small interface for Chrome browser.
Constant Summary
Constants included from Utilities
Utilities::DEFAULT_TIMEOUT, Utilities::POLL_SLEEP_TIME
Instance Attribute Summary
Attributes inherited from BaseInterface
Instance Method Summary collapse
- #current_page ⇒ Object
-
#initialize ⇒ FirefoxInterface
constructor
A new instance of FirefoxInterface.
Methods inherited from BaseInterface
#find_page, #find_state, #goto, #method_missing, #quit, #respond_to_missing?, #wait_for_transition
Methods included from Utilities
#await, #class_info, #location, #page?, #raise_if_not_page
Constructor Details
#initialize ⇒ FirefoxInterface
Returns a new instance of FirefoxInterface.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rutl/interface/firefox_interface.rb', line 8 def initialize @logged_in = true = Selenium::WebDriver::Firefox::Options.new .add_argument('--ignore-certificate-errors') .add_argument('--disable-popup-blocking') .add_argument('--disable-translate') .add_argument('--headless') if ENV['TRAVIS'] == 'true' @driver = Selenium::WebDriver.for :firefox, options: super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BaseInterface
Instance Method Details
#current_page ⇒ Object
19 20 21 22 23 24 |
# File 'lib/rutl/interface/firefox_interface.rb', line 19 def current_page url = @driver.current_url page = find_page(url) raise "PAGE NOT FOUND: #{url}, PAGES: #{@pages}" unless page page end |