class Marionette::WebDriver

Included Modules

Defined in:

marionette/web_driver.cr

Constant Summary

Log = ::Log.for("marionette.web_driver")

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(browser : Browser, url : URI, client : HTTP::Client, keep_alive : Bool = false) #

[View source]

Class Method Detail

def self.create_session(browser : Browser, exe_path = nil, port = nil, env = ENV.to_h, args = [] of String, **options) #

Create a new Session instance using the given #browser. If the driver is not on your PATH or is under a different name, you may want to provide its path explicitly using exe_path.

When the driver is started it will be automatically assigned a random open port. If you want to assign a port explicitly you can do so using the port parameter.

The environment variables the driver is exposed to can be set using env.

All other keyword arguments are passed directly into the #get_session call, which are then passed into Session.start.


[View source]

Instance Method Detail

def browser : Browser #

[View source]
def client : HTTP::Client #

[View source]
def connection_headers(url : String | URI, keep_alive : Bool = false) #

[View source]
def execute(command : String, params = {} of String => String) #

[View source]
def get_session(type : Session::Type = :local, **options) #

[View source]
def keep_alive? : Bool #

[View source]
def request(method, url, body = {} of String => String, headers = nil) #

[View source]
def url : URI | Nil #

[View source]
def url? : URI | Nil | Nil #

[View source]