Class: SikuliServer::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/sikuli-server/client.rb

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



5
6
7
8
# File 'lib/sikuli-server/client.rb', line 5

def initialize
  download_jars
  launch_server
end

Instance Method Details

#focus(title) ⇒ Object



14
15
16
17
18
19
# File 'lib/sikuli-server/client.rb', line 14

def focus title
  HTTParty.post("#{server_url}/execute", :body => {
    :method     => "focus",
    :parameters => [title].to_json
  }).body
end

#server_urlObject



10
11
12
# File 'lib/sikuli-server/client.rb', line 10

def server_url
  "http://localhost:7114"
end