Module: Howitzer::Web::IframeDsl::ClassMethods
- Defined in:
- lib/howitzer/web/iframe_dsl.rb
Overview
This module holds frame dsl class methods
Instance Method Summary collapse
-
#iframe(name, *args) ⇒ Object
Creates a group of methods to interact with described HTML frame on page.
Instance Method Details
#iframe(name, *args) ⇒ Object
Note:
This method generates following dynamic methods:
frame_name_iframe - equals capybara #within_frame(…) method
has_frame_name_iframe? - equals capybara #has_selector(…) method
has_no_frame_name_iframe? - equals capybara #has_no_selector(…) method
Creates a group of methods to interact with described HTML frame on page
85 86 87 88 89 90 91 92 93 94 |
# File 'lib/howitzer/web/iframe_dsl.rb', line 85 def iframe(name, *args) raise ArgumentError, 'iframe selector arguments must be specified' if args.blank? klass = args.first.is_a?(Class) ? args.shift : find_matching_class(name) raise NameError, "class can not be found for #{name} iframe" if klass.blank? define_iframe(klass, name, args) define_has_iframe(name, args) define_has_no_iframe(name, args) end |