hound v1.1.1 Hound.Helpers.Window View Source

Window size and other window-related functions

Link to this section Summary

Functions

Close the current window

Get all window handles available to the session

Set the focus to a specific frame, such as an iframe

Change focus to parent frame

Focus the window

Maximize the window

Get list of window handles available to the session

Get size of the window

Link to this section Functions

Link to this function

close_current_window() View Source
close_current_window() :: nil

Close the current window

Link to this function

current_window_handle() View Source
current_window_handle() :: String.t()

Get all window handles available to the session

Link to this function

focus_frame(frame_id) View Source
focus_frame(any()) :: :ok

Set the focus to a specific frame, such as an iframe

Example

iex> iframe = find_element(:id, "id-of-some-iframe")
iex> focus_frame(iframe)
nil
Link to this function

focus_parent_frame() View Source
focus_parent_frame() :: :ok

Change focus to parent frame

Link to this function

focus_window(window_handle) View Source
focus_window(String.t()) :: nil

Focus the window

Link to this function

maximize_window(window_handle) View Source
maximize_window(String.t()) :: :ok

Maximize the window

Link to this function

set_window_size(window_handle, width, height) View Source
set_window_size(String.t(), integer(), integer()) :: :ok

Change size of the window

Link to this function

window_handles() View Source
window_handles() :: list()

Get list of window handles available to the session

Link to this function

window_size(window_handle) View Source
window_size(String.t()) :: tuple()

Get size of the window