chroxy v0.7.0 Chroxy.ChromeServer
GenServer process which manages a port connection to a Chrome
browser OS Process as well as a ChromeRemoteInterface.Session to
the browser instance providing command and control over the instance.
The stdout and stderr messages from the os process are captured
and are used to determine state transitions, namely when the browser
is ready to start accepting connections, and when the browser enters
a critical error state and must be terminated.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Closes all open pages in the chrome instance.
Closes the page in the chrome instance.
Lists page sessions currently open to the chrome instance.
Creates a new chrome page (tab) within the chrome instance.
Blocks and performs a poll of the underlying Chroxy.ChromeServer to determine when
the chrome browser instance is ready for interaction.
Spanws a Chroxy.ChromeServer process which in turn starts an underlying
chrome browser os process, which is managed by a shared lifetime allowing
for managing Chrome Browser within an OTP Supervision model.
Link to this section Functions
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
close_all_pages(server)
Closes all open pages in the chrome instance.
close_page(server, page)
Closes the page in the chrome instance.
list_pages(server)
Lists page sessions currently open to the chrome instance.
new_page(server)
Creates a new chrome page (tab) within the chrome instance.
ready(server, opts \\ [])
Blocks and performs a poll of the underlying Chroxy.ChromeServer to determine when
the chrome browser instance is ready for interaction.
Keyword opts:
:retries- number to times to poll for ready state.:wait_ms- how long to sleep between polling calls.:crash_dumps_dir- where chrome should write crash dumps.
start_link(args)
Spanws a Chroxy.ChromeServer process which in turn starts an underlying
chrome browser os process, which is managed by a shared lifetime allowing
for managing Chrome Browser within an OTP Supervision model.