Module: Async::WebDriver::Scope::Document

Included in:
Async::WebDriver::Session
Defined in:
lib/async/webdriver/scope/document.rb

Overview

Helpers for working with the document.

Instance Method Summary collapse

Instance Method Details

#execute(script, *arguments) ⇒ Object

Execute a script in the current document.



27
28
29
# File 'lib/async/webdriver/scope/document.rb', line 27

def execute(script, *arguments)
	post("execute/sync", {script: script, args: arguments})
end

#execute_async(script, *arguments) ⇒ Object

Execute a script in the current document asynchronously.



35
36
37
# File 'lib/async/webdriver/scope/document.rb', line 35

def execute_async(script, *arguments)
	post("execute/async", {script: script, args: arguments})
end

#sourceObject

Get the current document source.



19
20
21
# File 'lib/async/webdriver/scope/document.rb', line 19

def source
	get("source")
end

#titleObject

Get the current document title.



13
14
15
# File 'lib/async/webdriver/scope/document.rb', line 13

def title
	get("title")
end