class Lebowski::Foundation::OpenedWindowApplication

Used to represent a SproutCore application that is contained within a web browser window that was opened by another window

Attributes

locator_type[R]
locator_value[R]

Public Class Methods

new(params) click to toggle source
# File lib/lebowski/foundation/application.rb, line 156
def initialize(params)
  super(params)
  
  if params[:parent_app].nil?
    raise ArugmentError.new "parent_app can not be nil"
  end
  
  @locator_type = params[:locator_type]
  @locator_value = params[:locator_value]
end

Public Instance Methods

close() click to toggle source

Closes the opened window if it is currently open

# File lib/lebowski/foundation/application.rb, line 177
def close()
  return if (not is_opened?)
  driver.sc_close_opened_window locator_type, locator_value
  if has_current_application_context?
    parent_app.reset_application_context
  end
end
do_acquire_application_context() click to toggle source
# File lib/lebowski/foundation/application.rb, line 185
def do_acquire_application_context()
  @driver.sc_select_window(locator_type, locator_value)
end
is_opened?() click to toggle source

Used to check if this window is open

# File lib/lebowski/foundation/application.rb, line 170
def is_opened?()
  return @driver.is_sc_opened_window?(locator_type, locator_value)
end