View Source ScraperEx.Window (scraper_ex v0.2.2)

This module exists to manage Hound sessions. One session is started per window and you can run functions on this window. To start multiple windows you create multiple of these processes.

example

Example

import Hound.Helpers

{:ok, pid} = ScraperEx.Window.start_link()

ScraperEx.Window.run_in_window(pid, fn session_id ->
  navigate_to("https://mysite.com")
  fill_field({:css, ".selector"}, "Hello World")
end)

Link to this section Summary

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

close_and_reopen_window(pid)

View Source
Link to this function

handle_continue(start_fn, opts)

View Source

Callback implementation for GenServer.handle_continue/2.

Callback implementation for GenServer.init/1.

Link to this function

run_in_window(pid, function)

View Source