class Marionette::WebDriver

Included Modules

Defined in:

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 = false) #

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.


Instance Method Detail

def browser : Browser #

def client : HTTP::Client #

def connection_headers(url : String | URI, keep_alive : Bool = false) #

def execute(command : String, params = {} of String => String) #

def get_session(type : Session::Type = :local, **options) #

def keep_alive? : Bool #

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

def url : URI? #

def url? : URI | Nil? #