class Lebowski::Foundation::FrameApplication

Used to represent a SproutCore application that is contained within an IFrame.

Attributes

locator[R]

Public Class Methods

new(params) click to toggle source
Calls superclass method Lebowski::Foundation::Application::new
# File lib/lebowski/foundation/application.rb, line 199
def initialize(params)
  super(params)
  
  if params[:parent_app].nil?
    raise ArugmentError.new "parent_app can not be nil"
  end
  
  @locator = params[:locator]
end

Public Instance Methods

do_acquire_application_context() click to toggle source
# File lib/lebowski/foundation/application.rb, line 209
def do_acquire_application_context()
  parents = []
  current_parent = self.parent_app
  while not current_parent.nil? do
    parents << current_parent
    current_parent = current_parent.parent_app
  end
  
  parents = parents.reverse
  
  parents.each do |parent|
    if parent.kind_of? FrameApplication
      @driver.select_frame parent.locator
    else
      parent.do_acquire_application_context
    end
  end
  
  @driver.select_frame(locator)
end