class RUTL::NullDriver
This is at a peer level to the webdrivers but it's for a fake application.
Attributes
context[RW]
Public Class Methods
new(context)
click to toggle source
# File lib/rutl/null_driver/null_driver.rb, line 10 def initialize(context) raise 'no context' unless context.is_a?(RUTL::Element::ElementContext) @context = context end
Public Instance Methods
find_element(type, location)
click to toggle source
Return a new one of these fake things so that it can be clicked ar written to or whatever.
# File lib/rutl/null_driver/null_driver.rb, line 17 def find_element(type, location) context = RUTL::Element::ElementContext.new(interface: @context.interface) RUTL::Element::NullElement.new(context, type, location) end
quit()
click to toggle source
Clean out the @@variables from NullElement. Other than this, this is a placeholder to match real drivers.
# File lib/rutl/null_driver/null_driver.rb, line 38 def quit RUTL::Element::NullElement.clear_variables end
to(url)
click to toggle source
Cheap second part to naviate.to(url) calls to look like real drivers.
# File lib/rutl/null_driver/null_driver.rb, line 30 def to(url) result = @context.interface.find_view(url) @context.interface.current_view = result result.url end