class Stoertebeker::Context
- Stoertebeker::Context
- Reference
- Object
Overview
Starts and terminates the electron server and connects the crystal client to it. Commands can be executed against the server vie IPC from this context, using the DSL methods.
Included Modules
Defined in:
stoertebeker.crConstructors
Instance Method Summary
- #client : RemoteClient
- #debugging? : Bool
- #server_process : Process | Nil
- #server_process? : Process | Nil | Nil
-
#start_client
Connects the client to the electron socket and pings the server.
-
#start_server
Starts the electron server.
-
#stop_server
Stops the server by firs sending the quit-command and then killing the process.
Instance methods inherited from module Stoertebeker::DSL
click(selector)
click,
current_path
current_path,
current_url
current_url,
evaluate(script)
evaluate,
execute(*args)execute(*args, &block : JSON::Any -> ) execute, exists?(selector) exists?, inner_html(selector) inner_html, page_title page_title, ping ping, quit(*args) quit, request(*args) request, screenshot(*args) screenshot, set_value(selector, value) set_value, wait_for(*args, **kwargs) wait_for, window(**args) window
Constructor Detail
Instance Method Detail
def start_server
#
Starts the electron server. It first runs npm install and raises if it fails. Waits for the socket file to be created.