Async::WebDriver SourceAsyncWebDriverScopeNavigation

module Navigation

Helpers for navigating the browser.

Definitions

def navigate_to(url)

Navigate to the given URL.

Signature

parameter url String

The URL to navigate to.

Implementation

def navigate_to(url)
	session.post("url", {url: url})
end

def current_url

Get the current URL.

Signature

returns String

The current URL.

Implementation

def current_url
	session.get("url")
end

def current_path

Get the path component of the current URL.

Signature

returns String

The current path.

Implementation

def current_path
	URI.parse(current_url).path
end

def navigate_back

Navigate back in the browser history.

Implementation

def navigate_back
	session.post("back")
end

def navigate_forward

Navigate forward in the browser history.

Implementation

def navigate_forward
	session.post("forward")
end

def refresh

Refresh the current page.

Implementation

def refresh
	session.post("refresh")
end