butterbee/webdriver
The webdriver module contains the WebDriver type and functions to create and configure webdriver sessions.
Types
Represents a webdriver session
pub type WebDriver(state) {
WebDriver(
socket: option.Option(@internal WebDriverSocket),
context: option.Option(browsing_context.BrowsingContext),
config: option.Option(config.ButterbeeConfig),
state: Result(state, @internal ButterbeeError),
)
}
Constructors
-
WebDriver( socket: option.Option(@internal WebDriverSocket), context: option.Option(browsing_context.BrowsingContext), config: option.Option(config.ButterbeeConfig), state: Result(state, @internal ButterbeeError), )Arguments
- socket
-
The socket to the webdriver server
- context
-
The browsing context of the webdriver session
- config
-
The config used during the webdriver session
- state
-
Some state that is returned from a command (e.g.
node.value()fills state with Result(String, error.ButterbeeError))
Values
pub fn get_config(
driver: WebDriver(state),
) -> Result(config.ButterbeeConfig, @internal ButterbeeError)
pub fn get_context(
driver: WebDriver(state),
) -> Result(
browsing_context.BrowsingContext,
@internal ButterbeeError,
)
pub fn get_socket(
driver: WebDriver(state),
) -> Result(@internal WebDriverSocket, @internal ButterbeeError)