Method: Howitzer::Web::Section.me

Defined in:
lib/howitzer/web/section.rb

.me(*args, **options) ⇒ Object

DSL method which specifies section container selector represented by HTML element. Any elements described in sections will start in this HTML element.

Examples:

class MenuSection < Howitzer::Web::Section
  me :xpath, ".//*[@id='panel']",
end

Parameters:

  • args (Array)

    original Capybara arguments. For details, see ‘Capybara::Node::Finders#all.

  • options (Array)

    original Capybara options. For details, see ‘Capybara::Node::Finders#all.

Raises:

  • (ArgumentError)

    if no arguments were passed



28
29
30
31
32
33
34
# File 'lib/howitzer/web/section.rb', line 28

def me(*args, **options)
  raise ArgumentError, 'Finder arguments are missing' if args.blank?

  @default_finder_args = args
  @default_finder_options = options
  self
end