Class: RUTL::Interface::Browser

Inherits:
Base
  • Object
show all
Defined in:
lib/rutl/interface/browser/browser.rb

Overview

Small interface for Chrome browser.

Direct Known Subclasses

Chrome, Firefox, InternetExplorer, Null

Constant Summary

Constants included from Waiter

Waiter::DEFAULT_TIMEOUT, Waiter::POLL_SLEEP_TIME

Instance Attribute Summary

Attributes inherited from Base

#camera, #driver, #views

Instance Method Summary collapse

Methods inherited from Base

#find_state, #find_view, #goto, #method_missing, #quit, #respond_to_missing?, #wait_for_transition

Methods included from Waiter

#await

Methods included from CheckView

#view?

Constructor Details

#initializeBrowser

Returns a new instance of Browser.



10
11
12
# File 'lib/rutl/interface/browser/browser.rb', line 10

def initialize
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class RUTL::Interface::Base

Instance Method Details

#current_viewObject



14
15
16
17
18
19
# File 'lib/rutl/interface/browser/browser.rb', line 14

def current_view
  url = @driver.current_url
  view = find_view(url)
  raise "NOT FOUND: #{url}, VIEWS: #{@views}" unless view
  view
end