Class: Sikuli::App

Inherits:
Object
  • Object
show all
Defined in:
lib/sikuli/app.rb

Instance Method Summary collapse

Constructor Details

#initialize(app_name) ⇒ App

Public: creates a new App instance

app_name - String name of the app

Examples

App.new("TextEdit")

Returns the newly initialized App



15
16
17
# File 'lib/sikuli/app.rb', line 15

def initialize(app_name)
  @java_obj = org.sikuli.script::App.new(app_name)
end

Instance Method Details

#focusObject

Public: brings the App to focus

Returns nothing



22
23
24
# File 'lib/sikuli/app.rb', line 22

def focus
  @java_obj.focus()
end

#windowObject

Public: the Region instance representing the app’s window

Returns the newly initialized Region



29
30
31
# File 'lib/sikuli/app.rb', line 29

def window
  Region.new(@java_obj.window())
end