Module: MechanicalCuke
- Included in:
- Capybara::Driver::MechanicalCuke
- Defined in:
- lib/mechanical-cuke.rb,
lib/mechanical-cuke/basic_auth.rb
Defined Under Namespace
Modules: BasicAuth
Class Attribute Summary collapse
-
.save_and_open_page_path ⇒ Object
Returns the value of attribute save_and_open_page_path.
Class Method Summary collapse
Instance Method Summary collapse
- #basic_auth(username, password) ⇒ Object
- #body ⇒ Object
- #current_page ⇒ Object
- #form ⇒ Object
- #get(url) ⇒ Object
- #mechanize ⇒ Object
- #response_body ⇒ Object
Class Attribute Details
.save_and_open_page_path ⇒ Object
Returns the value of attribute save_and_open_page_path.
6 7 8 |
# File 'lib/mechanical-cuke.rb', line 6 def save_and_open_page_path @save_and_open_page_path end |
Class Method Details
.configure {|_self| ... } ⇒ Object
7 8 9 |
# File 'lib/mechanical-cuke.rb', line 7 def configure yield self end |
Instance Method Details
#basic_auth(username, password) ⇒ Object
36 37 38 |
# File 'lib/mechanical-cuke.rb', line 36 def basic_auth(username,password) mechanize.basic_auth(username,password) end |
#body ⇒ Object
28 29 30 |
# File 'lib/mechanical-cuke.rb', line 28 def body current_page.body end |
#current_page ⇒ Object
20 21 22 |
# File 'lib/mechanical-cuke.rb', line 20 def current_page mechanize.current_page end |
#form ⇒ Object
32 33 34 |
# File 'lib/mechanical-cuke.rb', line 32 def form current_page.forms.first end |
#get(url) ⇒ Object
16 17 18 |
# File 'lib/mechanical-cuke.rb', line 16 def get(url) mechanize.get(url) end |
#mechanize ⇒ Object
12 13 14 |
# File 'lib/mechanical-cuke.rb', line 12 def mechanize @mechanize ||= Mechanize.new end |
#response_body ⇒ Object
24 25 26 |
# File 'lib/mechanical-cuke.rb', line 24 def response_body current_page.body end |