Class: Capybara::Driver::MechanicalCuke
- Inherits:
-
Base
- Object
- Base
- Capybara::Driver::MechanicalCuke
show all
- Includes:
- MechanicalCuke
- Defined in:
- lib/mechanical-cuke/capybara.rb
Defined Under Namespace
Classes: Node
Instance Method Summary
collapse
#basic_auth, configure, #current_page, #get, #mechanize, #response_body
Constructor Details
Returns a new instance of MechanicalCuke.
88
89
|
# File 'lib/mechanical-cuke/capybara.rb', line 88
def initialize(app)
end
|
Instance Method Details
#body ⇒ Object
Also known as:
source
78
79
80
|
# File 'lib/mechanical-cuke/capybara.rb', line 78
def body
current_page.body
end
|
#current_url ⇒ Object
84
85
86
|
# File 'lib/mechanical-cuke/capybara.rb', line 84
def current_url
current_page.uri.to_s
end
|
#find(locator) ⇒ Object
91
92
93
|
# File 'lib/mechanical-cuke/capybara.rb', line 91
def find(locator)
current_page.search(locator).map { |node| Node.new(self, node) }
end
|
95
96
97
|
# File 'lib/mechanical-cuke/capybara.rb', line 95
def form
current_page.forms.first
end
|
#visit(path) ⇒ Object
74
75
76
|
# File 'lib/mechanical-cuke/capybara.rb', line 74
def visit(path)
get path
end
|