Class: NullDriver
- Inherits:
-
Object
- Object
- NullDriver
- Defined in:
- lib/rutl/driver/null_driver.rb
Overview
This is at a peer level to the webdrivers but it’s for a fake brwoser.
Instance Attribute Summary collapse
-
#interface ⇒ Object
Returns the value of attribute interface.
Instance Method Summary collapse
- #find_element(type, location) ⇒ Object
-
#navigate ⇒ Object
Cheap way to handle browser.navigate.to(url) TODO: Until I care about the url and then I should ????.
- #quit ⇒ Object
- #to(url) ⇒ Object
Instance Attribute Details
#interface ⇒ Object
Returns the value of attribute interface.
7 8 9 |
# File 'lib/rutl/driver/null_driver.rb', line 7 def interface @interface end |
Instance Method Details
#find_element(type, location) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rutl/driver/null_driver.rb', line 9 def find_element(type, location) # Return a new one of these so that it can be clicked ar written # to or whatever. element = NullDriverPageElement.new(type, location) element.interface = @interface element end |
#navigate ⇒ Object
Cheap way to handle browser.navigate.to(url) TODO: Until I care about the url and then I should ????
19 20 21 22 23 |
# File 'lib/rutl/driver/null_driver.rb', line 19 def navigate result = NullDriver.new result.interface = @interface result end |
#quit ⇒ Object
31 32 33 |
# File 'lib/rutl/driver/null_driver.rb', line 31 def quit 'quit' end |
#to(url) ⇒ Object
25 26 27 28 29 |
# File 'lib/rutl/driver/null_driver.rb', line 25 def to(url) result = @interface.find_page(url) @interface.set_current_page result result.url end |