Class: Lebowski::Foundation::WindowApplication

Inherits:
Application show all
Defined in:
lib/lebowski/foundation/application.rb

Overview

Used to represent a SproutCore application that is contained within a web brower window

Direct Known Subclasses

MainApplication, OpenedWindowApplication

Constant Summary

Constants included from Lebowski::Foundation

SC_BRANCH_CLOSED, SC_BRANCH_OPEN, SC_BUTTON1_STATUS, SC_BUTTON2_STATUS, SC_BUTTON3_STATUS, SC_LEAF_NODE, SC_MIXED_STATE, SC_PICKER_FIXED, SC_PICKER_MENU, SC_PICKER_POINTER, SC_T_ARRAY, SC_T_BOOL, SC_T_CLASS, SC_T_ERROR, SC_T_FUNCTION, SC_T_HASH, SC_T_NULL, SC_T_NUMBER, SC_T_OBJECT, SC_T_STRING, SC_T_UNDEFINED

Constants included from Mixins::WaitActions

Mixins::WaitActions::DEFAULT_TIMEOUT

Instance Attribute Summary

Attributes inherited from Application

#app_context_manager, #parent_app

Attributes inherited from ProxyObject

#driver, #name, #parent, #rel_path

Instance Method Summary collapse

Methods inherited from Application

#abs_path, #acquire_application_context, #bundle_loaded?, #define_root_object, #do_aquire_application_context, #exec_driver_in_context, #exec_in_context, #has_current_application_context?, #key_pane, #main_pane, #responding_panes, #root_object

Methods included from Mixins::KeyCheck

#key_down?, #key_up?

Methods inherited from ProxyObject

#==, #[], #abs_path, #abs_path_with, #define, #define_proxy, #init_ext, #method_missing, #none?, #object?, #proxy, #represent_as, #sc_all_classes, #sc_class, #sc_guid, #sc_kind_of?, #sc_path_defined?, #sc_type_of, #unravel_relative_path

Methods included from Mixins::DefinePathsSupport

#define_path, #define_paths_for, #defined_path, #defined_paths, #path_defined?, #root_defined_path_part, #root_defined_path_part=

Methods included from Mixins::WaitActions

#wait_until

Constructor Details

#initialize(params) ⇒ WindowApplication

Returns a new instance of WindowApplication.



111
112
113
# File 'lib/lebowski/foundation/application.rb', line 111

def initialize(params)
  super(params)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Lebowski::Foundation::ProxyObject

Instance Method Details

#maximizeObject

Maximizes the browser window



136
137
138
139
140
# File 'lib/lebowski/foundation/application.rb', line 136

def maximize() 
  exec_driver_in_context do |driver|
    driver.sc_window_maximize
  end
end

#move_to(x, y) ⇒ Object

Moves the browser window



118
119
120
121
122
# File 'lib/lebowski/foundation/application.rb', line 118

def move_to(x, y)
  exec_driver_in_context do |driver|
    @driver.sc_window_move_to(x,y)
  end
end

#resize_to(width, height) ⇒ Object

Resizes the browser window



127
128
129
130
131
# File 'lib/lebowski/foundation/application.rb', line 127

def resize_to(width, height)
  exec_driver_in_context do |driver|
    driver.sc_window_resize_to(width, height)
  end
end